[flext] error while compiling parch PD

Thomas Grill gr at grrrr.org
Thu May 12 12:35:27 CEST 2011


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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://grrrr.org/pipermail/flext/attachments/20110512/e089e876/attachment.htm>


More information about the flext mailing list