C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Specify Precompiled Header Filename (/Fp)
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     Syntax:  /Fpfilename
 
     Use the /Fp option to specify the name of the desired .PCH file in
     cases where the .PCH filename specified with either the /Yc option
     or the /Yu option is different from the filename 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.PCH 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.PCH 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 use the /Fp option with the /Yu option to specify the name
     of the .PCH file if the name is different from either the
     <filename> argument to /Yc or the base name of the source file:
 
          CL /YuPROG.H /FpZPROG.PCH PROG.CPP
 
     This command specifies a precompiled header file named ZPROG.PCH.
     The compiler uses the contents of ZPROG.PCH to restore the
     precompiled state of all header files up to and including PROG.H.
     The compiler then compiles the code that occurs after the PROG.H
     include statement.
 
     NOTE: If no filename follows the /Fp option, CL emits an error.
           There is no default extension name for files named using
           the /Fp option.
 
     See also: Create a Precompiled Header
               Include Debugging Information
               Use Precompiled Header
               hdrstop pragma
                                    -♦-