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

#include in unix/linux

Status
Not open for further replies.

LaoMa

Programmer
Aug 24, 2002
10
US
A basic question of running c++ in unix/linux:
How to link the lib files such as #include <iostream>?
Thanks.
 
You're asking two different things.

#include <iostream>

appears in the source code and is used for compilation. The path for iostream would normally be set up by the compiler. Failing that, you'd probably have to do a find for it and set up the relevant directory using -I.

The library it is linked to should also be automatically picked up by g++. Failing that, you have to set up the directory using -L and the library using -l.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top