> I remember back in '00 when Braxton Thomason wrote:
> > Does anyone know about dynamically loaded modules for C++ in linux? I am
> > on AIX and trying to port some dynmodules, but linux does not have the
> > loadbind system call... Is there an equivalent or a way around this?
>
> Is that what you're looking for?
I have looked at dlopen and dlsym, but the problem comes up that, in C++,
you need to know the mangled names of the symbols for dlsym. Also, since
linux does not support import/export files for the link step, you need to
define stub functions so that the symbols in one module are defined in the
other. The most serious problem that I have encountered is classes --
dlsym gives you a pointer to a particular symbol, but you cannot have a
function pointer to a non-static class member (a C fcn pointer is very
different from a C++ pointer to member). AIX dynmodule support is pretty
cool, it allows you to import a list of undefined symbols to the linker,
and then load a module containing those symbols at runtime, and then
everything works just like it would if the two libraries had been
statically linked together..
thanks,
brax.
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]