[techtalk] Please help with c++ compiler @work

Laurel Fan lf25+ at andrew.cmu.edu
Wed Oct 27 18:21:49 EST 1999


Excerpts from linuxchix: 27-Oct-99 [techtalk] Please help with.. by
"Clare Smith"@pcisys.net 
> 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++
>  

Find out where your libraries (such as libstdc++.so) are, and add a
-L<path of libs> to the command line.  They're probably in a similar
place as the includes (ie. try /usr/local/lib if the includes are in
/usr/local/include).  Alternatively, set the environment variable
LD_LIBRARY_PATH to the right path.


************
techtalk at linuxchix.org   http://www.linuxchix.org




More information about the Techtalk mailing list