From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14838 invoked by alias); 29 Jun 2006 18:00:13 -0000 Received: (qmail 14767 invoked by uid 22791); 29 Jun 2006 18:00:11 -0000 X-Spam-Check-By: sourceware.org Received: from kabosu.cc.columbia.edu (HELO kabosu.cc.columbia.edu) (128.59.28.107) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 29 Jun 2006 18:00:05 +0000 Received: from kabosu.cc.columbia.edu (localhost [127.0.0.1]) by kabosu.cc.columbia.edu (8.13.7/8.13.6) with ESMTP id k5TI03C6005421 for ; Thu, 29 Jun 2006 14:00:03 -0400 (EDT) Received: (from www@localhost) by kabosu.cc.columbia.edu (8.13.7/8.13.0/Submit) id k5TI03sV005420 for gcc-help@gcc.gnu.org; Thu, 29 Jun 2006 14:00:03 -0400 (EDT) Received: from pc05346131031.jpl.nasa.gov (pc05346131031.jpl.nasa.gov [137.78.36.144]) by cubmail.cc.columbia.edu (IMP) with HTTP for ; Thu, 29 Jun 2006 14:00:03 -0400 Message-ID: <1151604003.44a415231dcb8@cubmail.cc.columbia.edu> Date: Thu, 29 Jun 2006 18:00:00 -0000 From: sew2111@columbia.edu To: gcc-help@gcc.gnu.org Subject: can I force linking to older libstdc++? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.8 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-06/txt/msg00272.txt.bz2 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?