Hi everybody,
i'm new at Pd platform and want to develop an iCreate Robot/Wiimote control project.
To do that in Pd i need to master in external handling. But, i'm having several problems with simple extras.
I tried to follow the Helloworld tutorial, and succeeded. But when i tried again, with some modifications it stoped working qnd did not return.
My code is exactly the same as the tutorial.
My makefile is the following:
LIB = m_pd.h
CXX = gcc
helloworld.pd_linux: helloworld.o
ld -export-dynamic -shared -o helloworld.pd_linux helloworld.o -lc -lm
helloworld.o: helloworld.c
$(CXX) -c helloworld.c -o helloworld.o
clean: clean
rm helloworld.pd_linux helloworld.o
.PHONY: distclean
on my notebook(running ubuntu 11.04 64bit), the compiling crashs:
ld -export-dynamic -shared -o helloworld.pd_linux helloworld.o -lc -lm
ld: helloworld.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
helloworld.o: could not read symbols: Bad value
make: ** [helloworld.pd_linux] Erro 1
In my desktop, it successfully build the helloworld.pd_linux, but on the startup, it fails on the object loading:
load_object: Symbol "helloworld_setup" not found
helloworld: can't load library
I've correctly put the helloworld.pd_linux in the /usr/lib/pd-extended/extra/helloworld, and set the directory as a startup path.
Does someone know, what is wrong? I really need to learn how to create external objects fast.
Thanks!