Module Dl
Bindings to the dlopen / dlsym interface.
type libraryThe type of dynamic libraries, as returned by
dlopen.
exceptionDL_error of stringAn error condition occurred when calling
dlopen,dlcloseordlsym. The argument is the string returned by thedlerrorfunction.
type flag=|RTLD_LAZY|RTLD_NOW|RTLD_GLOBAL|RTLD_LOCAL|RTLD_NODELETE|RTLD_NOLOAD|RTLD_DEEPBINDFlags for
dlopenNote for windows users: Only
RTLD_NOLOADandRTLD_NODELETEare supported. Passing no or any other flags todlopenwill result in standard behaviour: just LoadLibrary is called. IfRTLD_NOLOADis specified and the module is not already loaded, aDL_errorwith the string "library not loaded" is thrown; there is however no test, if such a library exists at all (like under linux).
val dlopen : ?filename:string -> flags:flag list -> libraryOpen a dynamic library.
Note for windows users: the filename must be encoded in UTF-8
val dlclose : handle:library -> unitClose a dynamic library.
val dlsym : ?handle:library -> symbol:string -> nativeintLook up a symbol in a dynamic library.