2.4. Precompiled header files

When you compile your 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 PreCompiled Header (PCH) files.

By default, when the compiler creates a PCH file, it:

Note

Support for PCH processing is not available when you specify multiple source files in a single compilation. If you request PCH processing and specify more than one primary source file, the compiler issues an error message, and aborts the compilation.

The ARM compiler can precompile header files automatically, or enable you to control the precompilation. For more information see:

Copyright © 2002-2007 ARM Limited. All rights reserved.ARM DUI 0205H
Non-Confidential