LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-27-2006, 07:14 PM   #1
jjstokes
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
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.
 
Old 06-28-2006, 11:08 AM   #2
jjstokes
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Original Poster
Rep: Reputation: 0
bump bump ?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
implication of statically linking to libstdc++ zero79 Linux - General 3 04-08-2006 01:03 PM
how to get previous version of rpm (mythtv) eikeland Linux - Software 1 03-10-2006 01:58 PM
Limewire removing previous version error novacrasher Linux - Software 0 02-01-2005 01:48 AM
How to remove/reinstall OR revert X to a previous version? C38368 Linux - Newbie 1 05-26-2004 02:57 AM
how to revert back to the previous kernel version? prav_284 Red Hat 3 12-10-2003 03:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration