g++ (2.95.2) and Linux RH7
Alexandre Oliva
aoliva@redhat.com
Thu Apr 5 21:34:00 GMT 2001
On Apr 5, 2001, Yves Fuhrman <yves.fuhrman@cea.fr> wrote:
> Then I tried to compile a small c++ :
> no error at compile time..( g++ -g)
> then : ./a.out => Segmentation fault (core dumped)
> gdb a.out =>
> Program received signal SIGSEGV, Segmentation fault.
> 0x4004c4c7 in ios::eof () from /usr/lib/libstdc++-libc6.2-2.so.3
Did you install gcc 2.95.2 with --prefix=/usr? If not, it looks like
you're getting your program linked with the shared library installed
as part of GCC 2.95.2, but, at run-time, it's using the library
installed as part of the libstdc++-2.96 RPM. I wonder why they have
the same SONAME, given that they aren't binary-compatible...
> does anyone knows what I am missing?
Point LD_LIBRARY_PATH at the directory containing the libstdc++ shared
library installed with GCC 2.95.2, or, when linking programs against
that library, use the -Wl,-rpath,directory link switch so that the
program will know where to find the library it needs.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-help
mailing list