[LV2] Dynamic loading for Windows plugins

JP Cimalando jp at cimalando.eu
Tue May 30 06:38:34 PDT 2017


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. The
dynamic loader of lilv will not find them and it will fail.

Linux and Mac offer the feature to make dynamic linking work, by
setting rpath=$ORIGIN or equivalent, but Windows has no such thing.

The alternative is static linking. But it is difficult to always do
static linking in practice for a variety of reasons. One of them for
example is that under mingw-w64, when you use the C++ STL, the compiler
wants to force use to link the winpthread DLL, regardless whether you
pass -static of not, or use threading at all. Another motivation to
desire dynamically linked dependencies may be in order to conform to
the LGPL license.

I can think of a solution to address the limitations of dynamic linking
on the Windows platform: in lilv, allow the library loader to find
dependency DLLs in the same directory as the plugin.
Do you approve of this proposal? If yes, I would gladly contribute this
improvement to the Windows loader.


More information about the Devel mailing list