When you compile source files, the included header files are also compiled. If a header
file is included in more than one source file, it is recompiled when each source file is
compiled. Also, you might include header files that introduce many lines of code, but the
primary source files that include them are relatively small. Therefore, it is often
desirable to avoid recompiling a set of header files by precompiling them. These are
referred to as PCH files.
By default, when the compiler creates a PCH file, it:
Support for PCH processing is not available when you specify multiple source files in a
single compilation. In such a case, the compiler issues an error message and aborts the
Do not assume that if a PCH file is available, it is used by the compiler. In some cases,
system configuration issues mean that the compiler might not always be able to use the PCH
file. Address Space Randomization on Red Hat Enterprise
Linux 3 (RHE3) is one example of a possible system configuration issue.
The compiler can precompile and use PCH files automatically with the
--pch option, or you can use the
--use_pch options to manually control the use of