Sponsored Content
Top Forums Programming Link against a particular version of libstdc++ Post 302118621 by vino on Wednesday 23rd of May 2007 07:02:15 AM
Old 05-23-2007
Link against a particular version of libstdc++

Our development machines have libstdc++.so.5 and libstdc++.so.6.

When we build our native code, it uses libstdc++.so.6. Is there anyway I can force it to use libstdc++.so.5 instead ?

Code:
[/tmp]$ ldd try
        /usr/lib/libcwait.so (0x00655000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x007cd000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00399000)
        libm.so.6 => /lib/tls/libm.so.6 (0x004c5000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x007a3000)
        /lib/ld-linux.so.2 (0x0037c000)
[/tmp]$ ls -l /usr/lib/libstdc++*
-rwxr-xr-x  1 root root 258288 Dec 14  2004 /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
-rwxr-xr-x  1 root root 268428 Dec 14  2004 /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
lrwxrwxrwx  1 root root     30 Oct 18  2006 /usr/lib/libstdc++-libc6.1-1.so.2 -> libstdc++-2-libc6.1-1-2.9.0.so
lrwxrwxrwx  1 root root     31 Oct 18  2006 /usr/lib/libstdc++-libc6.2-2.so.3 -> libstdc++-3-libc6.2-2-2.10.0.so
lrwxrwxrwx  1 root root     18 Oct 18  2006 /usr/lib/libstdc++.so.5 -> libstdc++.so.5.0.7
-rwxr-xr-x  1 root root 744136 Dec  1  2004 /usr/lib/libstdc++.so.5.0.7
lrwxrwxrwx  1 root root     18 Oct 18  2006 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.3
-rwxr-xr-x  1 root root 807680 Dec 20  2005 /usr/lib/libstdc++.so.6.0.3

Here the machine/gcc details

Code:
[/tmp]$ gcc --version
gcc (GCC) 3.4.5 20051201 (Red Hat 3.4.5-2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[/tmp]$ uname -a
Linux staci21 2.6.9-34.0.1.0.11.ELsmp #1 SMP Thu Oct 26 14:26:54 PDT 2006 i686 i686 i386 GNU/Linux
[/tmp]$

Thanks.
 

8 More Discussions You Might Find Interesting

1. AIX

libstdc++.a (libstdc++.so.5) issue on AIX 5.2

hello everybody i am new on the AIX environment and i have faced an issue while running pstill it can't find ibstdc++.a (libstdc++.so.5) although i have the latest GCC and libstdc 4.0.0 i guess. So to resolve the problem i have got an old versions that i want to install on AIX: ... (5 Replies)
Discussion started by: eternalflame
5 Replies

2. Solaris

Setting link to newly installed Java version

Hi, I have Solaris 8 wih Java 1.2.2 as default. I just upgraded it to Java 2 version 1.4. But when I do "java -version: I get following: "Java version "1.2.2" Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunjwit) How would I make solaris to look at my new java? If I have to... (4 Replies)
Discussion started by: harjitsingh
4 Replies

3. Ubuntu

how to recover libstdc++.so.6

Hi! I'm using Ubuntu Karmic and I lost libstdc++.so.6. Is there a way to recover it?.. Thanks in advance (0 Replies)
Discussion started by: Sapfeer
0 Replies

4. Red Hat

Unable to find libstdc++-libc6.2-2.so.3

Hi all, I am working on Red Hat Enterprise Linux ES release 4 (Nahant) with kernel 2.6.9-5 and try to install one application but unable to install it. When I am trying to install it,it is throwing the following error-- To resolve it,I installed gcc 4.0.0 and when I am trying to see gcc... (2 Replies)
Discussion started by: smartgupta
2 Replies

5. UNIX for Dummies Questions & Answers

[Solved] Packages required - Libaio.so.1 - Libstdc++so.6

hi guys I have to install a software that says have theses packages are required Libaio.so.1 Libstdc++so.6 are these default packages for a Suse 11 installation for instance? or do I need to download them to avoid dependency issues thanks a lot ---------- Post updated at 10:00 PM... (0 Replies)
Discussion started by: kopper
0 Replies

6. HP-UX

hpux vnc 4.1.3 libstdc++

It took me a while, but I found the right libsdc++ for the current free vnc 4.1.3, deep in this: http://mirrors.develooper.com/hpux/gcc-3.3.2-11.00.sd.bz Merijn's HP-UX software Download Section for ITRC members is a rich source for old libraries. So if you cannot find the right depot or... (0 Replies)
Discussion started by: DGPickett
0 Replies

7. UNIX for Advanced & Expert Users

Figure out the minimum os version neede to run executable or link library.

Hello, I need to figure out the minimum OS version needed to run some executable. For the following OS: Linux, AIX, Solaris. For example how do I know the minimum OS version for /bin/ls ? "file" command does not give me much information. There are some tools that are helpful for understanding... (4 Replies)
Discussion started by: +Yan
4 Replies

8. Programming

Issues with two versions of libstdC++.so

I'm facing an issue in which my program is using a custom library (say, libxyz.so) which is compiled using libstdc++.so.5 and the system I'm using this library to create an executable from my program, has libstdc++so.6 as well as libstdc++.so.5; both available under /usr/lib directory. There are... (8 Replies)
Discussion started by: Praveen_218
8 Replies
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy