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 05-03-2004, 03:49 AM   #1
maga_lm
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Rep: Reputation: 0
Question Problem when using libstdc++


Hi,

I'm trying to compile and build a library which must be linked with the libstdc++.
But I have the following error :
/usr/bin/ld: cannot find -lstdc++

I don't understand : I installed the latest gcc, g++ and libstdc++ versions (debian packages) : gcc-3.3, g++-3 and libstdc++-3.

Do you have an idea in order to solve this problem ?

Thanks for your help !
 
Old 05-03-2004, 10:57 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"'m trying to compile and build a library which must be linked with the libstdc++.
But I have the following error :
/usr/bin/ld: cannot find -lstdc++"

You may have a version number mismatch or something similar. Take a look and see what you actually have installed:
find /usr/lib -iname "*libstdc++*"
and look to see what libraries are included in the dynamic link list, /etc/ld.so.config

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeB....home.page.html

Steve Stites
 
Old 05-04-2004, 02:29 AM   #3
maga_lm
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Here is the result of find /usr/lib -iname "*libstdc++*":

/usr/lib/libstdc++.so.5.0.5
/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
/usr/lib/libstdc++-libc6.2-2.so.3
/usr/lib/gcc-lib/i386-linux/3.0.4/libstdc++.so
/usr/lib/gcc-lib/i386-linux/3.0.4/libstdc++.a
/usr/lib/gcc-lib/i386-linux/2.95.4/libstdc++.so
/usr/lib/gcc-lib/i386-linux/2.95.4/libstdc++.a
/usr/lib/libstdc++.so.5
/usr/lib/libstdc++-libc6.2-2.a.3
/usr/lib/libstdc++-3-libc6.2-2-2.10.0.a
/usr/lib/libstdc++-3-libc6.1-2-2.10.0.so
/usr/lib/libstdc++-libc6.1-2.so.3
/usr/lib/libstdc++.so.3.0.4
/usr/lib/libstdc++.so.3


and here is my ld.so.conf:
/usr/lib
/usr/X11R6/lib
/usr/lib/GNUstep/System/Libraries/ix86/linux-gnu
/usr/lib/GNUstep/System/Libraries/ix86/linux-gnu/gnu-gnu-gnu

I think, as you told me, that there is a problem of version :
What is the best way to solve it ?

Thanks in advance

Aurelien
 
Old 05-04-2004, 03:51 AM   #4
Grymme
Member
 
Registered: Apr 2004
Location: Sweden
Distribution: Slackware
Posts: 44

Rep: Reputation: 15
Do you have a libstdc++.so? (I can't see it in your list)

If not you should create a symbolic link. Here's how my symbolic link looks like: libstdc++.so -> libstdc++.so.5.0.5*

Also, have you made the system aware of it by running ldconfig?
 
Old 05-04-2004, 06:49 AM   #5
maga_lm
LQ Newbie
 
Registered: Mar 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I created the symbolic link and it works now :-)

Many thanks for your help.

Aurelien
 
  


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
fluxbox-0.9.13 problem with gcc and libstdc++ StewieG Linux - Software 1 08-22-2005 03:04 PM
Problem with UT2004 and libstdc++ EnigmaX Linux - Software 1 08-19-2005 04:02 AM
mismatched rpm versions of libstdc++ and libstdc++-devel pcweirdo Linux - Software 8 11-29-2004 09:30 AM
gcc libstdc++ problem tygernoot Programming 1 11-03-2004 04:43 PM
problem with libstdc++.la kiedis Linux - Software 3 02-22-2004 03:21 PM

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

All times are GMT -5. The time now is 09: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