HI there Clare
 
The error mean the Library Linking rogram could not find the Library stdc++ to link to.
This usually mean the library is not installed, or not int youir library search path.
 
first thing to do is check if you have the library.
 
RedHat Based systems:
 
type "rpm -q -a |grep stdc++" and see what comes back .. you should at least have libstdc++-2.x.x or something similar.
If not grab you CD / FTP and install the package :)
 
If you do have it but still nothing you have ( or you are not on a RH based system ) use updatedb to update your filesystem DB and then
type "locate libstdc++"
 
is should give you a location like
 
"/usr/lib" or "/usr/local/lib" or something/lib.
 
Then you need to make a note of the path to the library and as root edit your "/etc/ld.so.conf" file
This file is the mapping to your library directories. If the path is NOT in there you have to add it.
 
Once you have a:) installed the RPM b:) located the library and added the path in ld.so.conf then you need to update the ld DB.
type "ldconfig -v | grep stdc++" and you should get a responce like libstdc++.so.x.x =>libstdc++.so.x.x
 
that should add the library for compile time linking ..
 
Try again and it should work..
 
Henti / bain
-----Original Message-----
From: Clare Smith [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 27, 1999 11:51 PM
To: Techtalk
Subject: [techtalk] Please help with c++ compiler @work

My c++ compiler at home work just fine with the "g++ <source.cc>" command. The one at work seems to be in pieces. I''ve figured out where they hid the includes but can't figure out the "collect2".
 
My command line is "g++ -I<path of includes> <source.cc>" and I get
Collect2: ld returned 1 exit status
/usr/bin/ld:
Can't locate file for: -lstdc++
 
Please point me in the right direction
Thanks,
Clare

Reply via email to