Linking to dynamic library in plugin

Hi,

I want to add a Julia backend to the VCV prototype plugin (for VCV Rack 2).

It’s in an early stage, i.e. it should first work on my computer (Windows with MSYS 64) and I will see later how to make it work properly on other platforms.

At the moment, whenever I call the Julia API, VCV Rack crashes and in the debugger, I get these kinds of messages:

=library-unloaded,id="C:\\Users\\steff\\AppData\\Local\\Programs\\Julia-1.7.1\\bin\\libjulia-internal.dll",target-name="C:\\Users\\steff\\AppData\\Local\\Programs\\Julia-1.7.1\\bin\\libjulia-internal.dll",host-name="C:\\Users\\steff\\AppData\\Local\\Programs\\Julia-1.7.1\\bin\\libjulia-internal.dll",thread-group="i1"

I tried to research what this library-unloaded means and my best guess is that the host application (Rack.exe) decides to unload this library?

My questions:

  • Is it possible to link to other dynamic libraries in a plugin code?
  • Are there any restrictions here, like for example, that Rack.exe and the libraries need to be built with the same compiler? Or do the libraries be at specific locations?

(If relevant, my current state is here: https://github.com/SteffenPL/VCV-Prototype/tree/v2)