Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

shared libraries

Started by XiRDisrupter Jun 26, 2007 at 11:08 AM 2 replies 1k views
Original Post
XiRDisrupter
XiRDisrupter
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...
Bregma
Bregma
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
the_edd
the_edd
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
XXX_Andrew_XXX
XXX_Andrew_XXX
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.