[LV2] Dynamic loading for Windows plugins
Robin Gareus
robin at gareus.org
Tue May 30 06:59:37 PDT 2017
On 05/30/2017 03:38 PM, JP Cimalando wrote:
> Hello!
>
> When I build some of my test plugins for MS Windows, I am in a
> troublesome situation when I try to load them in Carla.
> I cannot ship DLL dependencies of my plugin in the bundle.
Plugins are supposed to be self-contained and not have any external
dependencies. This basically means statically linking them.
The reasoning here is the to avoid conflicts. Plugin A may depend on
libXYZ DLL version1 and Plugin B on the a different version of the same
lib. API/ABI conflicts are worse on Windows because the runtime linker
uses ordinals. Also hide all symbols and only expose the entry-point
(MSVC does hide symbols by default, mingw/gcc needs -fvisibility-hidden)
Have a look at other plugins-standards: VSTs are statically linked for
the same reason.
The only other option is to have the plugin dynamically load the shared
library (from a fixed location) LoadLibrary() or dlopen()
ciao,
robin
More information about the Devel
mailing list