[flext] error while compiling parch PD
alessandro mason
mason.alessandro.pec at gmail.com
Thu May 12 12:01:14 CEST 2011
Hi,
I'm trying to implement this external for pd:
#define FLEXT_SHARED 1
#define FLEXT_USE_CMEM 1
// include flext header
#include <flext.h>
// check for appropriate flext version
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
#error You need at least flext version 0.4.1
#endif
class plus: public flext_base
{
FLEXT_HEADER(plus,flext_base)
float f1,f2;
plus(float f): f1(0), f2(f) //costructor#
{
AddInAnything("Bang or Number");
AddInFloat("Argument");
AddOutFloat("Result");
FLEXT_ADDBANG(0, m_bang); // add methods
FLEXT_ADDMETHOD(0,m_float);
FLEXT_ADDMETHOD(1,m_arg);
}
inline void m_bang() {ToOutFloat(0,f1+f2);}
inline void m_float(float f) {ToOutFloat(0,(f1=f)+f2);}
inline void m_arg(float f) {f2=f;}
FLEXT_CALLBACK(m_bang); //callback wrappers
FLEXT_CALLBACK_F(m_float);
FLEXT_CALLBACK_F(m_arg);
};
FLEXT_NEW_1("plus",plus,float0) // set up class
When I compile the file occours a lot of errors like this:
obj\Release\main.o:main.cpp|| undefined reference to
`flext_obj_shared::obj_add(bool, bool, bool, bool, char const*, char const*,
void (*)(flext_class*), flext_obj_shared* (*)(int, _atom*), void
(*)(flext_hdr*), int, ...)'|.
How can I resolve this problem? Thanks
Mason Alessandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20110512/92db1c93/attachment.htm>
More information about the flext
mailing list