Precompiled Header Filename Option (/Fp)

The /Fp option gives you extra control over the name of the .PCH file. Use it to specify a .PCH filename that is different from the name of the associated include file or source file. For example, if you want to create a precompiled header file for a debugging version of your program, you can specify a command such as:

CL /DDEBUG /YcPROG.H /FpDPROG PROG.CPP

This command creates a precompilation of all header files up to and including PROG.H and stores it in a file called DPROG.PCH. If you need a release version in parallel, you simply change the compilation command to:

CL /YcPROG.H /FpRPROG PROG.CPP

This command creates a separate precompilation of the header files up to and including PROG.H and stores it in RPROG.PCH.

You can also specify the /Fp option when using (/Yu) a precompiled header.