NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

/Fp (Name .pch File)

/Fppathname

Use this option with /YX, /Yc, or /Yu to provide a pathname for a precompiled header instead of using the default pathname. You can also use /Fp with /Yc to specify the use of a precompiled header file that differs from the /Yc filename argument and from the base name of the source file.

If you do not specify an extension as part of the pathname, an extension of .pch is assumed. If you specify a directory without a filename, the default filename is VC60.pch.

You can also use the /Fp option with the /Yu and /YX options.

Examples

The following command renames the precompiled header file created and used by /YX:

CL /YX /FpMYPCH.PCH PROG.CPP

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:

CL /DDEBUG /Zi /Yc /FpDPROG.PCH PROG.CPP

The following command specifies the use of a precompiled header file named MYPCH.pch. The compiler assumes that the source code in PROG.cpp has been precompiled through MYAPP.h, and that the precompiled code resides in MYPCH.pch. It uses the content of MYPCH.pch and compiles the rest of PROG.cpp to create an .obj file. The output of this example is a file named PROG.exe.

CL /YuMYAPP.H /FpMYPCH.PCH PROG.CPP

The following 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. If you need a release version in parallel, you simply change the compilation command to:

CL /Yc /FpRPROG.PCH PROG.CPP

See Also

Output-File (/F) Options | Compiler Options | Setting Compiler Options | Precompiled Header Compiler Options | Specifying the Pathname