[flext] error while compiling parch PD

alessandro mason mason.alessandro.pec at gmail.com
Thu May 12 15:37:38 CEST 2011


ok! thanks

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

> Hi Alessandro,
> there are two existing build system for flext-based externals that have
> been used successfully in the past. The flext build system (described in
> readme.txt and build.txt) and the newer autoconf-based system. My suggestion
> would be to try those first before using Codeblocks or other untested
> systems.
> gr~~~
>
> Am 12.05.2011 um 15:29 schrieb alessandro mason:
>
> I've tried to ling dll library, to make the suggested corrections, but
> nothing changes.
> So, i've implemented the external under Linux/Debian with codeblocks and I
> compile the file with no errors.
> I've changed the extention of the created library from .so to .pd_linux and
> i've load the external in PD. But the PD console shows this error:
> ./libplus.pd_linux: ./libplus.pd_linux: undefined symbol:
> _ZN17flext_base_single4InitEv
>
> What can I do?
>
> PS. Sorry for my English :-D
>
> 2011/5/12 Thomas Grill <gr at grrrr.org>
>
>> Hi,
>> if i remember correctly, compilation in shared mode under Windows requires
>> linkage to flext-pd.dll, not to the static library.
>> I would also suggest to set FLEXT_SHARED and FLEXT_USE_CMEM macros with
>> the compiler (or the Codeblocks environment) and not in the source code,
>> since those settings must be uniform in a project (e.g. with multiple source
>> files).
>> gr~~~
>>
>> Am 12.05.2011 um 12:27 schrieb alessandro mason:
>>
>> 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
>>>
>>>
>>>
>>>
>>
>>    --
>> Thomas Grill
>> http://grrrr.org
>> +43 699 19715543
>>
>>
>>
>>
>
> --
> Thomas Grill
> http://grrrr.org
> +43 699 19715543
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20110512/e8b4ccdb/attachment-0001.htm>


More information about the flext mailing list