cxa_atexit with gcc3.2.3 on solaris2.6
Juan Carlos Franzoy
jfranzoy@yahoo.com.ar
Tue Oct 2 16:41:00 GMT 2007
Hello.
I am having a problem compiling gcc3.2.3 on solaris2.6. I run configure this way:
mkdir gcc-objdir
cd gcc-objdir
../gcc-3.2.3/configure --prefix=/usr/local/gcc-3.2.3 --enable-shared --enable-threads=posix --enable-__cxa_atexit --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-languages=c++
The linker says that __cxa_atexit is not defined !!
If I do not use --enable-__cxa_atexit I could not do dlopen of a dynamic library with static objects. The samples are attached. These samples are not mine. To compile them I run:
g++ -shared libtest.so -fPIC test2.c
g++ -oprueba test.c
The output of 'prueba' is:
In main
In shared object
Shared object creating ...
Back in main
Goodbye, world.
Segmentation Fault(coredump)
What I could read in the Net is that the destructor of the static object inside g() is called after dlclose. Has anybody there know a solution for this?
Thanks.
Seguí de cerca a la Selección Argentina de Rugby en el Mundial de Francia 2007.
http://ar.sports.yahoo.com/mundialderugby
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.c
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20071002/19971454/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test2.c
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20071002/19971454/attachment-0001.c>
More information about the Gcc-help
mailing list