hello,
i'm trying to make a working readanysf~ external. it compiles and starts with flext 0.4.7 from debian/experimental, but crashes Pd when sending a stop message.
when using an the november 2003 version from debian, i get the error:
/opt/download/readanysf~0.13/src/readanysf~.pd_linux: /usr/local/lib/libflext.so: undefined symbol: garray_updatetime readanysf~ ... couldn't create
building of the 0.4.5 doesn't work, too
oli1:/opt/installed/flext# sh build-pd-linux.sh g++ -c -O2 -DFLEXT_SYS=2 -I/opt/cvs/pd/src -I./source source/flbase.cpp -o pd-linux/flbase.ro In file included from source/flbase.cpp:27: /opt/cvs/pd/src/g_canvas.h:549: error: parse error before `template' make: *** [pd-linux/flbase.ro] Error 1 oli1:/opt/installed/flext#
any idea what i could try next? :-)
or any alternatives for playing mp3, ogg or flac files with adjustable pitch?
Hi,
i'm trying to make a working readanysf~ external. it compiles and starts with flext 0.4.7 from debian/experimental, but crashes Pd when sending a stop message.
when using an the november 2003 version from debian, i get the error:
/opt/download/readanysf~0.13/src/readanysf~.pd_linux: /usr/local/lib/libflext.so: undefined symbol: garray_updatetime readanysf~ ... couldn't create
this means that your pd header files don't match the version of libflext.so you are linking against. Try recompiling flext with your actual pd version.
building of the 0.4.5 doesn't work, too
oli1:/opt/installed/flext# sh build-pd-linux.sh g++ -c -O2 -DFLEXT_SYS=2 -I/opt/cvs/pd/src -I./source source/flbase.cpp -o pd-linux/flbase.ro In file included from source/flbase.cpp:27: /opt/cvs/pd/src/g_canvas.h:549: error: parse error before `template' make: *** [pd-linux/flbase.ro] Error 1 oli1:/opt/installed/flext#
Older versions of pd have the problem that the header files use C++ keywords that can't be handled properly while compiling C++ code. Use a newer pd version.
good luck, Thomas
Thomas Grill wrote:
building of the 0.4.5 doesn't work, too
oli1:/opt/installed/flext# sh build-pd-linux.sh g++ -c -O2 -DFLEXT_SYS=2 -I/opt/cvs/pd/src -I./source source/flbase.cpp -o pd-linux/flbase.ro In file included from source/flbase.cpp:27: /opt/cvs/pd/src/g_canvas.h:549: error: parse error before `template' make: *** [pd-linux/flbase.ro] Error 1 oli1:/opt/installed/flext#
Older versions of pd have the problem that the header files use C++ keywords that can't be handled properly while compiling C++ code. Use a newer pd version.
it's from cvs, only some weeks old. too old for flext 0.4.5?
Older versions of pd have the problem that the header files use C++
keywords
that can't be handled properly while compiling C++ code. Use a newer pd version.
it's from cvs, only some weeks old. too old for flext 0.4.5?
Hi Oliver, on the contrary, it's too new. Seems like the cvs version of g_canvas.h hasn't made it to any of the newer 0.38-0/1 releases that i'm using. I think the problem lies in line 549 EXTERN void word_free(t_word *wp, t_template *template); which should be fixed. (i'll post a bug report) Meanwhile, please change the word "template" to let's say "karl", "franz" or "josef". It's your choice, but it must not be a C/C++ keyword.
best greetings, Thomas
Thomas Grill wrote:
that can't be handled properly while compiling C++ code. Use a newer pd version.
it's from cvs, only some weeks old. too old for flext 0.4.5?
Hi Oliver, on the contrary, it's too new. Seems like the cvs version of g_canvas.h hasn't made it to any of the newer 0.38-0/1 releases that i'm using. I think the problem lies in line 549 EXTERN void word_free(t_word *wp, t_template *template); which should be fixed. (i'll post a bug report) Meanwhile, please change the word "template" to let's say "karl", "franz" or "josef". It's your choice, but it must not be a C/C++ keyword.
i sucessfully compiled it with 0.38.0 (debian package from ubuntu). problem is, that readanysf~ compiled with 0.4.5 still crashes Pd.
it's from cvs, only some weeks old. too old for flext 0.4.5?
Hmm, this of course brings us to another topic. I just realized that the version you are using is the HEAD revision of the PD cvs, while you should rather use the STABLE_0_38 branch. The HEAD revision is most likely and most of the time ahead of flext and me, although, now that i realized, i'll track the changes therein.
Also, i commited a fix to the template keyword to this main branch, although i'm surely not supposed to do that - it's Miller's playground. I'm sorry, i won't do that again.
most humbly, Thomas
On Thu, 13 Jan 2005, Thomas Grill wrote:
Hmm, this of course brings us to another topic. I just realized that the version you are using is the HEAD revision of the PD cvs, while you should rather use the STABLE_0_38 branch. The HEAD revision is most likely and most of the time ahead of flext and me, although, now that i realized, i'll track the changes therein. Also, i commited a fix to the template keyword to this main branch, although i'm surely not supposed to do that - it's Miller's playground. I'm sorry, i won't do that again.
For the time that those releases will be used by people, if someone wants to compile C++ externals with them, the workaround is rather simple:
#define template template_really #include <whatever.h> #undef template
it's a good tip to remember, as it doesn't only occur for Pd, but also for various other C libraries once in a while. Also, here's another one that may be useful from time to time:
extern "C" { #include <whatever.h> };
will resolve some linking problems between C code and C++ code, when the header itself doesn't do it, and that the compiler can't guess it.
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
/opt/download/readanysf~0.13/src/readanysf~.pd_linux: /usr/local/lib/libflext.so: undefined symbol: garray_updatetime readanysf~ ... couldn't create
garray_updatetime is only available in pd>=devel_0_37 ... i suppose, you are trying to compile against another version of pd than flext is compiled against ...
there should definitely be a unified api between devel_ and stable_ soon!
cheers ... tim
thanks for the help, now readanysf~ runs without crashing Pd.
for readnysf~ 0.13 you need to compile it against flext 0.4.5. it doesn't work with 0.4.6 or 0.4.7. flext also didn't compile with the devel branch, but if i understand it correctly thomas fixed it today in cvs.
thanks for the help, i would never had figured it out by myself.
readanysf~ is really nifty :-)