Hi Frank,
error: Bad arguments for message 'mydsp~' to object 'objectmaker' ... you might be able to track this down from the Find menu. mydsp~ ... couldn't create
Using a constructor with a default argument like mydsp(float arg=0) you still have to give a creation argument in PD because the default values are not (yet?) recognized.
g++ -c -O6 -mpentium -g -DPD -I/usr/lib/pd/include -I../flext dspobj.cpp -o dspobj.o dspobj.cpp: In function
void mydsp_tilde_setup(...)': ../flext/flbase.h:122: member
flext_obj::m_name' is non-static but referenced as a static member dspobj.cpp:30: at this point in file make: *** [dspobj.o] Error 1
There is a bug in flext v 0.1.1:
Please change the line flbase.h:289 from
FLEXT_CLREF(NEW_CLASS::m_name,NEW_CLASS ## EXTERN_NAME),
to
FLEXT_CLREF(NAME,NEW_CLASS ## EXTERN_NAME), \
i think your external should load now!
greetings, Thomas
Hi, Thomas Grill hat gesagt: // Thomas Grill wrote:
There is a bug in flext v 0.1.1: Please change the line flbase.h:289 from FLEXT_CLREF(NEW_CLASS::m_name,NEW_CLASS ## EXTERN_NAME),
to FLEXT_CLREF(NAME,NEW_CLASS ## EXTERN_NAME), \
With this patch, I can now use: FLEXT_TILDE_NEW("mydsp~", mydsp) and all is working fine. I attached the working dspobj.cpp code again. I think, it is impressive how much more readable the C++ version is compared to the original dspobj~.c in pd/doc/6.externs/
And the flext version would run on Max/MSP as well, wouldn't it?
__ __
Frank Barknecht ____ ______ ____ __ trip\ \ / /wire ______
/ __// __ /__/ __// // __ \ / / __ \ ___\
/ / / ____/ / / / // ____// /\ \ ___\____ \
/_/ /_____/ /_/ /_//_____// / \ \_____\_____
/_/ _\