can I force linking to older libstdc++?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux