linking with a previous version of libstdc++
heres the description:
using g++ to compile.
trying to use sharedlibrary (libxxx.1.2.so) compiled on a different machine.
main.o is the object file for main.cpp which i created
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?
Last edited by jjstokes; 06-27-2006 at 07:15 PM.
|