Compiler Option Consistency

The following table lists compiler options that might trigger an inconsistency warning when using a precompiled header:

Table 2.1 Compilation Option Consistency

Option Name Rule

/AX or /Axxx Memory model selection Must be the same between the compilation that created the precompiled header and the current compilation. If these options differ, a warning message results.
/D Define constant Must be the same between the compilation that created the precompiled header and the current compilation. The state of defined constants is not checked, but unpredictable results can occur if these change.
/E or /EP Send preprocessed output to standard output Precompiled headers do not work with the /E or /EP options./Fr or /FR Generate Source Browser information For the /Fr and /FR options to be valid with the /Yu option, they must also have been in effect when the precompiled header was created. Subsequent compilations that use the precompiled header also generate Source Browser information. Browser information is placed in a single .SBR file and is cross-referenced by other files in the same manner as CodeView information; see “Including Debugging Information (/Yd),”. Unlike CodeView information, you cannot override the placement of Source Browser information.
/Gw or /GW Windows protocol options Must be the same between the compilation that created the precompiled header and the current compilation. If these options differ, a warning message results.
/Zi Generate CodeView information If this option is in effect when the precompiled header is created, subsequent compilations that use the precompilation can use that CodeView information. If /Zi is not in effect when the precompiled header is created, subsequent compilations that use the precompilation and the /Zi option trigger a warning. The debugging information is placed in the current object file, and local symbols defined in the precompiled header are not available to CodeView.

Note:

The precompiled header facility is not intended for use with files that are not C or C++ programs. Precompiled headers are not guaranteed to work with text files.