I’m trying to build a Web audio module. It works fine to build as standalone and it also works fine to build if I left out the functions:
OnParamChange(int paramIdx) override;
void OnIdle() override;
bool OnMessage(int msgTag, int ctrlTag, int dataSize, const void* pData) override;
but then I can’t control the synth.
I get these error messages when I try to build with the functions:
error: undefined symbol: _ZN10BassMatrix13OnParamChangeEi (referenced by top-level compiled C/C++ code)
warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols
warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0`
warning: __ZN10BassMatrix13OnParamChangeEi may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN10BassMatrix6OnIdleEv (referenced by top-level compiled C/C++ code)
warning: __ZN10BassMatrix6OnIdleEv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
error: undefined symbol: _ZN10BassMatrix9OnMessageEiiiPKv (referenced by top-level compiled C/C++ code)
warning: __ZN10BassMatrix9OnMessageEiiiPKv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
Error: Aborting compilation due to previous errors
emcc: error: '/home/runner/work/_temp/3f11d704-6a25-408d-bf25-3e8a43595fb5/emsdk-master/node/14.15.5_64bit/bin/node /home/runner/work/_temp/3f11d704-6a25-408d-bf25-3e8a43595fb5/emsdk-master/upstream/emscripten/src/compiler.js /tmp/tmpp2vtt720.txt' failed (1)
make: *** [BassMatrix-wam-controller.mk:12: ../build-web/scripts/BassMatrix-web.js] Error 1
emmake: error: 'make --makefile BassMatrix-wam-controller.mk EXTRA_CFLAGS=-DWEBSOCKET_CLIENT=0' failed (2)
IPlugWEB WASM compilation failed
Error: Process completed with exit code 1.
Maybe its I that implementing the functions wrong, but I have no idea how I should implement them another way.
For thoose who is curious. The web module so far looks and sounds like this https://olawistedt.github.io/BassMatrix/
You have missing symbols errors, which usually means that you didn’t include an implementation file (.cpp) in the build process. You probably need to add a .cpp file here to the WAM_SRC line in the config/BassMatrix-web.mk, or if the cpp is required in both the DSP and EDITOR compilation stages, you can add it to SRC
I didn’t knew I had any layout issues. But now I see them
You are very welcome to fix this issues if you have the time and feel it would be fun. I have sent you an invitation to be a collaborator in the BassMatrix Github project.