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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GCC and Libraries 1

Status
Not open for further replies.

rpbenito

Programmer
Jun 13, 2001
63
0
0
US
I have the source code for an old program written in C++ for a SGI machine. I am trying to compile it within my account on the SGI machine using gcc. I need to tell the compiler where the libraries are (I keep getting the error that the library files aren't found). I am new to gcc and SGI and unix. Could someone please direct me, I know I have to tell the compiler where the libraries are. I even know the path where the libraries are. PLEASE HELP!!!!

Thanks,
Pat
 
Use the command-line options -L and -l (lower-case L). Use -L to specify the path to the libraries and -l to specify the library itself. If the library name is, for example, "libio.a", you need "-lio" on the command line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top