What's the system include directory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux