Share via


/Fp - Specify Precompiled Header

This option gives extra control over the name of the precompiled header .pch file. You can use it with the /YX, /Yc, and /Yu options to specify a .pch file name that is different from the default.

/Fpfilename

The following example causes the compiler either to use a precompiled header named Mypch.pch, if it exists, or to create the file, if it does not exist.

CLxxx /YX /FpMYPCH.PCH PROG.CPP

Where CLxxx is the name of the compiler for the target processor family.

If you want to create a precompiled header file for a debugging version of your program, and you are compiling both header files and source code, you can specify a command such as:

CLARM /DDEBUG /Z7 /Yc /FpDPROG.PCH PROG.CPP

This command assumes the existence of a hdrstop pragma in Prog.cpp and creates a precompilation of all code up to the hdrstop pragma. The precompiled code is stored in a file called Dprog.pch.

See Also

/YX - Automate Precompiled Header | /Yc - Create Precompiled Header | /Yd - Duplicate Debugging Info

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.