c++/8847: dynamic_cast segfaults with shared lib
christoph.wiedemann@daimlerchrysler.com
christoph.wiedemann@daimlerchrysler.com
Mon Jan 27 15:36:00 GMT 2003
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=88
47
Hi,
i had the same problem with linking against libGLU.so.
It seems to be that dynamic_cast is internally using the symbol __dynamic_cast,
which is exported by libGLU:
>nm /usr/lib/libGLU.so | grep dynamic_cast
>0007b1d4 T __dynamic_cast
but also by libstdc++:
>nm /usr/local/lib/libstdc++.so | grep dynamic_cast
>00050a00 T __dynamic_cast
In my case, it is enough to export the environment variable LD_PRELOAD to the
/usr/local/lib/libstdc++.so, or to pass the linker flag -lstdc++ as the _first_
-l option.
Kind Regards,
--------------------------------------------------------------------------------
----- Christoph Wiedemann
DaimlerChrysler AG, Research Center Ulm
P.O. Box 2360, 89013 Ulm, Germany
Phone: +49 731 505 4123
e-mail: christoph.wiedemann@daimlerchrysler.com
--------------------------------------------------------------------------------
-----
More information about the Gcc-bugs
mailing list