Consistency Rules for the /YX Option (Windows CE 5.0)

Send Feedback

The following list shows rules that ensure consistent use of the /YX option.

  • If a precompiled header file exists, either Msvc.pch or one specified by /Fp, the compiler compares it to the current compilation for consistency. The following requirements must be met; otherwise, a new precompiled header file is created, and the new file overwrites the old:

  • The current compiler options must match those specified by the precompiled header.

  • The current working directory must match that specified by the precompiled header.

  • The order and values of all #include and #pragma preprocessor directives must match those specified when the precompiled header was created. These, along with #define directives, are checked one by one as they appear during subsequent compilations that use the precompiled header.

    The values of #define directives must match. However, a group of #define directives in sequence need not occur in exactly the same order, because there are no semantic order dependencies for #define directives.

    The #pragma directives must be nearly identical; multiple spaces outside of strings are treated as a single space to allow for different programming styles.

  • The value and order of include paths specified on the command line with /I options must match those specified when the precompiled header was created.

  • The timestamps of all header files, that is, all files specified with #include directives, used to build the precompiled header must match those that existed when the precompiled header was created.

See Also

/YX - Automate Precompiled Header

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.