/Yc - Create Precompiled Header (Windows CE 5.0)

Send Feedback

This option instructs the compiler to create a precompiled header (.pch) file that represents the state of compilation at a certain point. No space is allowed between /Yc and filename.

/Yc[<filename>]

The following list describes how to use /Yc with or without a file name.

  • Using /Yc with a File Name

    If you specify a file name with the /Yc option, the compiler compiles all code up to and including the specified file for subsequent use with the /Yu - Use Precompiled Header option.

    The precompiled code is saved in a file with a name created from the base name of the file specified with the /Yc option and a .pch extension.

    You can also use the /Fp - Specify Precompiled Header option to specify a name for the resulting precompiled header file.

    If the options /Ycfilename and /Yufilename occur on the same command line and both reference, or imply, the same filename, /Ycfilename takes precedence. This characteristic simplifies the writing of makefiles.

  • Using /Yc Without a File Name

    If you specify the /Yc option with no file name, the resulting precompiled header saves the compilation state at the end of the base source file, or, if the base file contains a hdrstop pragma, at the place where the hdrstop pragma occurs.

    The resulting .pch file has the same base name as your base source file unless you specify a different file name using the hdrstop pragma.

See Also

Compiler Options | /Yu - Use Precompiled Header | /Fp - Specify Precompiled Header

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.