<div dir="ltr"><div><div><div><div><div>Hi all,<br><br></div>I am currently trying to create a chugin with IBNIZ <a href="http://pelulamu.net/ibniz/">http://pelulamu.net/ibniz/</a> (it generate weird and loud sound, take care of your ears, headphones and speakers if you try it!!).<br>
</div>My target is to only have sound from it.<br><br></div>Ibniz source code is C, so I added the C file defining the functions I want to reuse inside the chugin make file:<br>C_MODULES=vm_slow.c<br><br></div>I call 3 of these functions inside the code generated by chuginate script: ibniz class defined in ibniz.cpp (chugin cpp source file)<br>
<br></div>Compilation seems ok except 2 warnings:<br><div><br><div><div><div>~/Chuck/chugins/ibniz$ make clean; make linux<br>rm -rf vm_slow.o ibniz.o ibniz.chug<br>gcc -D__LINUX_ALSA__ -I../chuck/include/ -fPIC -O3 -c -o vm_slow.o vm_slow.c<br>
g++ -D__LINUX_ALSA__ -I../chuck/include/ -fPIC -O3 -c -o ibniz.o ibniz.cpp<br>In file included from ibniz.h:12:0,<br>                 from ibniz.cpp:15:<br>vm.h:46:3: warning: anonymous type with no linkage used to declare variable '<anonymous struct> vm' with linkage [enabled by default]<br>
ibniz.cpp: In constructor 'ibniz::ibniz(double)':<br>ibniz.cpp:45:24: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]<br>gcc -shared -lstdc++ -o ibniz.chug vm_slow.o ibniz.o<br>
<br></div><div>Then I perform the: sudo make install<br><br></div><div>And the problem occurs when I try to launch a <a href="http://test.ck">test.ck</a> file<br></div><div>[<a href="http://test.ck">test.ck</a>]:line(1): undefined type 'ibniz'...<br>
[<a href="http://test.ck">test.ck</a>]:line(1): ... in declaration ...<br><br></div><div>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:<br><br>
</div><div>[chuck]:(3:SEVERE):  |  | error loading chugin 'ibniz.chug', skipping<br>[chuck]:(3:SEVERE):  |  | error from chuck_dl: '/usr/lib/chuck/ibniz.chug: undefined symbol: _Z6vm_runv'<br><br></div><div>
vm_run() is one of the C functions I call in the chugin cpp file. So I suppose _Z6vm_runv is linked to it.<br><br></div><div>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.<br>
<br></div><div>Any idea?<br></div><div>What is chuck_dl?<br><br></div><div>Thanks for your help.<br></div><div>Ju<br></div><div><br></div></div></div></div></div>