~/Chuck/chugins/ibniz$ make clean; make linux
rm -rf vm_slow.o ibniz.o ibniz.chug
gcc -D__LINUX_ALSA__ -I../chuck/include/ -fPIC -O3 -c -o vm_slow.o vm_slow.c
g++ -D__LINUX_ALSA__ -I../chuck/include/ -fPIC -O3 -c -o ibniz.o ibniz.cpp
In file included from ibniz.h:12:0,
from ibniz.cpp:15:
vm.h:46:3: warning: anonymous type with no linkage used to declare variable '<anonymous struct> vm' with linkage [enabled by default]
ibniz.cpp: In constructor 'ibniz::ibniz(double)':
ibniz.cpp:45:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
gcc -shared -lstdc++ -o ibniz.chug vm_slow.o ibniz.o
Then I perform the: sudo make install
And the problem occurs when I try to launch a
test.ck file
[
test.ck]:line(1): undefined type 'ibniz'...
[
test.ck]:line(1): ... in declaration ...
I added verbose option 3 to check what goes wrong and I found that my ibniz.chug is not loaded cause of the following error:
[chuck]:(3:SEVERE): | | error loading chugin 'ibniz.chug', skipping
[chuck]:(3:SEVERE): | | error from chuck_dl: '/usr/lib/chuck/ibniz.chug: undefined symbol: _Z6vm_runv'
vm_run() is one of the C functions I call in the chugin cpp file. So I suppose _Z6vm_runv is linked to it.
As a test, I tried to remove all these C functions and the chugin is loading and running. So I think I made something wrong to integrate these functions correctly inside the chugin code.
Any idea?
What is chuck_dl?
Thanks for your help.
Ju