Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

g++ compile error

Status
Not open for further replies.

ktrumbla

MIS
Oct 24, 2001
13
US
when I try to compile a simple program written in C++ I get the error:"collect2: Library libm not found"

this is a simple parsing utlility which takes a "|" delimited file reads each segment into a string array and writes it back out as a "|" delimeted file. (it currently has no use I am learning c++ and trying to make it work.) The code works perfectly when compiled with Visual C++.
 
could you be more exact on which compiler you use on what system (was it AIX?) and parameters

looks like a utility "collect2" is linked to a library "libm" which it cannot find or it is linked statically against "libm" which has changed since compilation
 
Yes I guess that might be some good information - running on AIX 4.3.3 compiled with g++ 2.0.7 - initially I wrote it with Visual C++ version 6 without any problems, the only headers I included were iostream, fstream, and string. Also I used namespace std
 
There were no parameters passed to the compiler I used from the command line "g++ ./parsing.cpp"
 
Version number of g++ is incorrect that was a version of anothe package I loaded at the same time I do not have the version number with me it is at the office
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top