Load dynamic library by file name in D

Is there a way in D to load a dynamic library by specifying the exact file name and path? I want to implement a plugin system using dynamic libraries in a dedicated folder.

I'm looking for something like Runtime.loadLibrary(in char[] name), but instead of a name, it has to go the full way.

+3
source share
1 answer

Runtime.loadLibraryimplemented in terms of dlopenand LoadLibrary.

On the dlopen man page: "If the file name contains a slash (" / "), it is interpreted as a (relative or absolute) path."

On the MSDN page of LoadLibrary: "If the string specifies the full path, the function searches only that path for the module."

, , , loadLibrary, ( , loadLibrary , tbh , ).

+5

All Articles