This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8847: dynamic_cast segfaults with shared lib
- From: <christoph dot wiedemann at daimlerchrysler dot com>
- To: <nobody at gcc dot gnu dot org>, <gcc-bugs at gcc dot gnu dot org>, <hans dot utz at informatik dot uni-ulm dot de>, <gcc-prs at gcc dot gnu dot org>, <gcc-gnats at gcc dot gnu dot org>, <himself at markus-hillebrand dot de>
- Date: Mon, 27 Jan 2003 14:00:23 +0100
- Subject: Re: c++/8847: dynamic_cast segfaults with shared lib
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
--------------------------------------------------------------------------------
-----