If you want cross-platform library loading without having to develop for each platform's API individually, libltdl may help.
Libtool provides a small library, called libltdl
, that aims at hiding the various difficulties of dlopening libraries from programmers. It consists of a few headers and small C source files that can be distributed with applications that need dlopening functionality. On some platforms, whose dynamic linkers are too limited for a simple implementation of libltdl
services, it requires GNU DLD, or it will only emulate dynamic linking with libtool's dlpreopening mechanism.
libltdl supports currently the following dynamic linking mechanisms:
dlopen
(Solaris, Linux and various BSD flavors)
shl_load
(HP-UX)
LoadLibrary
(Win16 and Win32)
load_add_on
(BeOS)
NSAddImage
or NSLinkModule
(Darwin and Mac OS X)
- GNU DLD (emulates dynamic linking for static libraries)
- libtool's dlpreopen (see see Dlpreopening)
Boost.Extension seems to only support Windows PE dll
s, UNIX ELF shared objects, and Mac OS X Mach-O bundles. Well, that may be sufficient for you...