[flext] error while compiling parch PD

alessandro mason mason.alessandro.pec at gmail.com
Thu May 12 12:27:36 CEST 2011


I'm sorry.

I use Codeblocks with MinGW  under WINDOWS for write and compile the code. I
link the library flext-pd.lib and set the directories for headers files and
I've add the flag FLEXT_SYS=2.

Alessandro

2011/5/12 Thomas Grill <gr at grrrr.org>

> Hi Alessandro,
> it would be most useful to know how you compile your code.
> gr~~~
>
> Am 12.05.2011 um 12:01 schrieb alessandro mason:
>
>  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
>> _______________________________________________
>> http://grrrr.org/ext/flext
>>
>> flext mailing list
>> flext at grrrr.org
>> http://grrrr.org/cgi-bin/mailman/listinfo/flext
>>
>
> --
> Thomas Grill
> http://grrrr.org
> +43 699 19715543
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20110512/ac005e0c/attachment.htm>


More information about the flext mailing list