shared libraries

Started by
2 comments, last by XXX_Andrew_XXX 16 years, 9 months ago
greetings my question is: exist some cross-platform library with a focus on DLL or shared libraries handling and/or loading(particulary C++ libraries)? any help will be very appreciated...
Advertisement
Quote:Original post by XiRDisrupter
exist some cross-platform library with a focus on DLL or shared libraries handling and/or loading(particulary C++ libraries)?


You could investigate libtool's ltdl library, but I'm not sure if it will work with MSVC. It works with GCC/MinGW, though.

--smw

Stephen M. Webb
Professional Free Software Developer

Qt3 has a QLibrary class. I think they changed the class structure in Qt4, but the same functionality exists AFAIK.

But even that was based on another library (for the POSIX platforms). I can't remember what that other library was, but it's free to use. It's pretty easy to implement that kind of functionality on Windows using LoadLibrary() etc, too.

Of course things won't be entirely uniform so tread carefully. The "intersection of functionality" that shared libraries provide across various platforms can be frustratingly small, depending on the platforms you're targeting and compilers you're using.

Edd
It's really not that much of a hassle to write your own wrapper around the C API's of whatever platform you're working on, with a simple factory implementation (search the boards).

If you need to do something intelligent with name clashes then I agree with the previous poster, investigate libtool, but in the past I've found it to be a bit of a hassle.

Win32:

LoadLibrary, FreeLibrary, GetProcAddress

Linux:

dlopen, dlclose, dlsym

This topic is closed to new replies.

Advertisement