What's the system include directory?
parmenides
mobile.parmenides@gmail.com
Sun Jan 19 15:59:00 GMT 2014
I am reading GCC's manual, and feel uncertain about the concept of
system headers.
1. What are system headers?
According to CPP's manual,
"The header files declaring interfaces to the operating system and
runtime libraries often cannot be written in strictly conforming C."
For Linux, the headers of Linux are located at
/usr/include/linux
The headers of runtime libraries are located at
/usr/include # for C library
and
/usr/lib/gcc/target/version/include # for gcc's library
According to gcc's installation manual, pertaining to
--with-local-prefix configuation option,
"Both the local-prefix include directory and the GCC-prefix include
directory are part of GCC's 隆掳system include隆卤 directories. "
Thus, the local headers are located at
/usr/local/include
Does the above statements are correct? One more question, what is the
local headers? It seems that headers from other softwares are considered
as local headers, right? what kind of softwares' headers are to be
installed in /usr/local/include?
2. Are system directories are equivalent to GCC's default include search
directories?
According to CPP's manual,
"GCC looks in several different places for headers. On a normal Unix
system, if you do not instruct it otherwise, it will look for headers
requested with #include <file> in:
/usr/local/include
libdir/gcc/target/version/include
/usr/target/include
/usr/include
"
For bracket include statement, GCC is to search the above four
directories by default. Are these four are system directories? Are there
any other directories count as?
More information about the Gcc-help
mailing list