public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* can I force linking to older libstdc++?
@ 2006-06-29 18:00 sew2111
  0 siblings, 0 replies; only message in thread
From: sew2111 @ 2006-06-29 18:00 UTC (permalink / raw)
  To: gcc-help

Brief Description:
-I am trying to use a shared library (libxxx.1.2.so) which was
compiled on a different machine, with an older version of g++ (no
source)
-main.cpp/main.o is my test code to use this library.

Problem:
-libxxx.1.2.so seems to need an older version of libstdc++, whereas
the compiler i'm using now will not allow my code to revert to this
older libstdc++ (I have the old libstdc++.so).

Dump:

try #1:

g++ -o main /home/jstokes/dco//libxxx.1.2.so main.o
warning: libstdc++.so.5, needed by /home/jstokes/dco//libxxx.1.2.so,
may conflict with libstdc++.so.6

ldd main
libxxx.1.2.so => not found
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04a71000)
libm.so.6 => /lib/tls/libm.so.6 (0x00aa3000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0080a000)
libc.so.6 => /lib/tls/libc.so.6 (0x00977000)
/lib/ld-linux.so.2 (0x0095e000)

notice that libxxx is not found...weird..but the important thing is
the warning given

try #2:
g++ -o main /home/jstokes/dco//libxxx.1.2.so /usr/lib/libstdc++.so.5
main.o

ldd main
/home/jstokes/dco//libxxx.1.2.so (0x00164000) libstdc++.so.5 =>
/usr/lib/libstdc++.so.5 (0x00176000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04a71000)
libm.so.6 => /lib/tls/libm.so.6 (0x00aa3000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0080a000)
libc.so.6 => /lib/tls/libc.so.6 (0x00977000)
/lib/ld-linux.so.2 (0x0095e000)

now it can find libxxx properly, and i don't get the warning..but i
don't want it using to different versions of libstdc++ at the same
time!! How do i get these two programs to just use libstdc++.so.5?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-29 18:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-29 18:00 can I force linking to older libstdc++? sew2111

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).