Hi
I took the code found here http://iem.kug.ac.at/pd/externals-HOWTO/node3.html#SECTION000360000000000000... placed it in a file helloworld.c, but got:
atte@ajstrup:~/music/synth/pd/externals/atte$ gcc helloworld.c
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
_start': ../sysdeps/i386/elf/start.S:115: undefined reference to
main'
/tmp/ccuN3zCm.o: In function helloworld_bang': helloworld.c:(.text+0xe): undefined reference to
post'
/tmp/ccuN3zCm.o: In function helloworld_new': helloworld.c:(.text+0x23): undefined reference to
pd_new'
/tmp/ccuN3zCm.o: In function helloworld_setup': helloworld.c:(.text+0x3d): undefined reference to
gensym'
helloworld.c:(.text+0x6d): undefined reference to class_new' helloworld.c:(.text+0x89): undefined reference to
class_addbang'
collect2: ld returned 1 exit status
I must have done something quite wrong...
This is under debian/linux, gcc version 4.1.2, pd 0.40-2.
I believe the file m_pd.h is to be found: atte@ajstrup:~/music/synth/pd/externals/atte$ slocate m_pd.h /usr/local/include/m_pd.h /home/atte/software/pd/pd-0.40-2/src/m_pd.h
Atte André Jensen wrote:
Hi
I took the code found here http://iem.kug.ac.at/pd/externals-HOWTO/node3.html#SECTION000360000000000000... placed it in a file helloworld.c, but got:
atte@ajstrup:~/music/synth/pd/externals/atte$ gcc helloworld.c
oops, an external is no executable but a dll, you have to compile/link it differently. see http://pure-data.cvs.sourceforge.net/pure-data/doc/tutorials/externals-howto...
mfg.ard IOhannes
IOhannes m zmoelnig wrote:
see http://pure-data.cvs.sourceforge.net/pure-data/doc/tutorials/externals-howto...
Thanks, that works!
Atte André Jensen wrote:
Hi
I took the code found here http://iem.kug.ac.at/pd/externals-HOWTO/node3.html#SECTION000360000000000000... placed it in a file helloworld.c, but got:
atte@ajstrup:~/music/synth/pd/externals/atte$ gcc helloworld.c /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
_start': ../sysdeps/i386/elf/start.S:115: undefined reference to
main' /tmp/ccuN3zCm.o: In functionhelloworld_bang': helloworld.c:(.text+0xe): undefined reference to
post' /tmp/ccuN3zCm.o: In functionhelloworld_new': helloworld.c:(.text+0x23): undefined reference to
pd_new' /tmp/ccuN3zCm.o: In functionhelloworld_setup': helloworld.c:(.text+0x3d): undefined reference to
gensym' helloworld.c:(.text+0x6d): undefined reference toclass_new' helloworld.c:(.text+0x89): undefined reference to
class_addbang' collect2: ld returned 1 exit statusI must have done something quite wrong...
This is under debian/linux, gcc version 4.1.2, pd 0.40-2.
I believe the file m_pd.h is to be found: atte@ajstrup:~/music/synth/pd/externals/atte$ slocate m_pd.h /usr/local/include/m_pd.h /home/atte/software/pd/pd-0.40-2/src/m_pd.h
Hi Atte, You're making a library, not an executable.
Try this:
gcc -o helloworld.o -c helloworld.c
then
ld -export_dynamic -shared -o helloworld.pd_linux
-c.