# pkgs including both single- and double-precision externals a single external binary (say: "foo.dll") can hold both single-precision and double-precision variants of the [foo] object.
I'm also interested in how this works. The following solution popped up in my head: compile the object twice, one time with -DPD_FLOATSIZE=32 and another time with -DPD_FLOATSIZE=64, with different setup functions based on -DPD_FLOATSIZE, then link it with a third file which exports the "real" setup function (which calls the other two private setup functions).
Is there an easier way?
If not, then a new extension could be handy, so people can throw both versions into the same folder.
Christof
Gesendet: Dienstag, 10. Dezember 2019 um 21:45 Uhr Von: "Lucas Cordiviola" lucarda27@hotmail.com An: "pd-dev@lists.iem.at" pd-dev@lists.iem.at Betreff: Re: [PD-dev] Double precision externals extensions.
On 12/10/2019 4:54 PM, IOhannes m zmölnig wrote:
# avoiding crashes an external that has been compiled with single-precision will not register objectclasses in a double-precision Pd - so the doubl-precision Pd will not know about those new objects and not crash while using them. same goes for the other way round.
I see with normal externals itt refuses to load and thats fine.
But I'm creating a single binary external with a collection of authors [zexy] [cyclone] [ggee] [pddplink] ...
I create a setup for the lib and is working *OK* in Pd-w64-32 but it crashed the double precision.
this is my wrapper setup:
#include "m_pd.h" #include <stdio.h> #include <stdarg.h> #ifdef __WIN32__ # define vsnprintf _vsnprintf #endif typedef struct liblucdep { t_object t_ob; } t_liblucdep; t_class *liblucdep_class=NULL; static void *liblucdep_new(void) { t_liblucdep *x = (t_liblucdep *)pd_new(liblucdep_class); return (x); } void liblucdep_setup(void) { post("*******************"); post("liblucdep loaded."); post("*******************"); liblucdep_class = class_new(gensym("liblucdep"), liblucdep_new, 0, sizeof(t_liblucdep), 0, 0); /* ************************************** */ coll_setup(); comment_setup(); freeverb_tilde_setup(); glue_setup(); helplink_setup(); image_setup(); pddplink_setup(); pink_tilde_setup(); reson_tilde_setup(); tabminmax_setup(); time_setup(); z_tilde_setup(); } ~~~~~~~~~~~~~~~~~ > > # pkgs including both single- and double-precision externals > a single external binary (say: "foo.dll") can hold both single-precision > and double-precision variants of the [foo] object. How is that? As I am willing to contribute to the w32/64-double Deken. :) Mensaje telepatico asistido por maquinas. _______________________________________________ Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev