C/C++ Compiler (cl.hlp) (
Table of Contents;
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Precompiled Header Options
◄Up► ◄Contents► ◄Index► ◄Back►
─────C/C++ Compiler─────────────────────────────────────────────────────────
With the /Yc, /Yd, /Yu, and /Fp options and the hdrstop pragma,
Microsoft C/C++ provides the ability to precompile code.
Precompilation, especially when used in conjunction with the fast
compile (/f) option, can dramatically reduce compile time for code
that is frequently compiled without modification.
You can precompile a stable body of code, which can be header
files and all or part of source files--including inline code.
Precompilation will work with both C and C++.
This process saves the state of a compilation (including CodeView
information) in a file with a .PCH extension called a precompiled
header file. In later compilations, the compiler simply restores
the saved compilation state from a precompiled header file, which
saves you the time required to recompile the code.
NOTE: The following compiler options are not supported when
creating or using precompiled headers:
Option Compiler Action
/E Preserve #line Directives
/EP Remove #line Directives
/P Create Preprocessed File
/Zg Generate Function Prototypes
See also: ◄Create a Precompiled Header►
◄Include Debugging Information►
◄Use Precompiled Header►
◄Specify Precompiled Header Filename►
◄hdrstop pragma►
◄Using Precompiled Headers in PWB►
-♦-