| You can use that approach: in your module define a csoundModuleCreate() that calls
the template function plugin<>() that registers the plugin (instead of putting it in
onload()). Don’t include modload.h in that case.
Then follow what Mike suggests.
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952
> On 5 Sep 2017, at 14:36, Ed Costello wrote:
>
> I see that there, I am however using Victor’s CPOF to develop plugins and I’m not sure if I can do something similar.
> Ed
>
>> On 4 Sep 2017, at 23:51, Michael Gogins wrote:
>>
>> Some plugins already are statically linked for WASM. The code is in
>> csound/Top/init_static_modules.c, just follow the pattern there. Each
>> module has to have a renamed csoundModuleCreate function to prevent
>> your problem, so the opcode itself then also has to be modified to
>> match, see for example ftsamplebank.cpp.
>>
>> Regards,
>> Mike
>>
>> -----------------------------------------------------
>> Michael Gogins
>> Irreducible Productions
>> http://michaelgogins.tumblr.com
>> Michael dot Gogins at gmail dot com
>>
>>
>> On Mon, Sep 4, 2017 at 6:15 PM, Ed Costello wrote:
>>> Hi,
>>> I am trying to add csound plugins which have no external dependencies to the WASM/Emscripten build.
>>> I was able to compile csound and the plugin opcodes to llvm byte code using emmake, then I tried adding libarrayops.so (for arrayops.cpp) to the final binary using emcc and was actually successful. I then tried to add libpvsops.so (for pvsops.cpp) as well but unfortunately this gave me a duplicate symbol error: error: Linking globals named 'csoundModuleCreate': symbol multiply defined! Does anyone have any pointers on how I could fix |