egcs and dlopen with C++ shared libraries

egcs and dlopen with C++ shared libraries

Post by Andi Bire » Fri, 02 Apr 1999 04:00:00



Hi,

I'm trying to build shared libraries with egcs on AIX4.3.2 that can be
loaded dynamically
with dlopen. Everything works when I'm linking with a main directly, but
when I use dlopen
the static Initializers are not executed. Has anybody a solution for the
problem? For xlC there seems to be the makeC++SharedLib script, is there
anything similar for egcs?

 
 
 

egcs and dlopen with C++ shared libraries

Post by Jens-Uwe Mag » Fri, 02 Apr 1999 04:00:00



>I'm trying to build shared libraries with egcs on AIX4.3.2 that can be
>loaded dynamically
>with dlopen. Everything works when I'm linking with a main directly, but
>when I use dlopen
>the static Initializers are not executed. Has anybody a solution for the
>problem? For xlC there seems to be the makeC++SharedLib script, is there
>anything similar for egcs?

The AIX builtin dlopen does probably not know about the egcs static
constructors. You might try the dlopen at
<http://www.han.de/~jum/aix/dlfcn.shar>, this nows about gcc static
initializers. It does not handle all cases of indirect shared C++ libraries,
but it might be a start.

--
Jens-Uwe Mager  <pgp-mailto:62CFDB25>