cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
accessing headers
accessing headers
Aug 19, 2014 at 6:33am UTC
csstudent123
(409)
what does this mean and does it depend on OS?
$g++ -I/usr/local/include main.cpp
Aug 19, 2014 at 6:44am UTC
abhishekm71
(820)
This includes the path
/usr/local/include
in the list of paths to be searched for the header files.
Yes the directory structure seems to be specific to the Linux OS.
Aug 19, 2014 at 6:45am UTC
Peter87
(11234)
The
-I
command adds a directory where it will search for header files. It works the same on all operating systems, but of course the directory might not be the same. In this case
/usr/local/include
looks like it's being used on a Linux system.
https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Directory-Options.html
Aug 20, 2014 at 11:17am UTC
csstudent123
(409)
thanks
Topic archived. No new replies allowed.