C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Use Precompiled Header (/Yu)
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     Syntax:  /Yu[filename]
 
     The /Yu option instructs the compiler to restore the state of
     previously compiled code using a precompiled header file. No space
     is allowed between the option and <filename>.
 
     If <filename> is specified, it must correspond to one of the header
     files included in the source file using the #include preprocessor
     directive. The compiler skips to the specified #include directive,
     restores the compiled state from the precompiled header file, and
     then compiles only code that follows <filename>. Unless the /Fp
     option is used, the compilation state is restored from a file that
     has the same base name as the include file and a .PCH extension.
     See:/Fp
 
     If <filename> is not specified with /Yu, your source program must
     contain a hdrstop pragma that specifies the filename. The compiler
     skips to the location of that pragma, restores the compiled state
     from the precompiled header file specified by the pragma, and then
     compiles only code that follows the pragma. If the hdrstop pragma
     does not specify a filename, the compiler looks for a file with a
     name derived from the base name of the source file and that has
     the .PCH extension.
 
     If you specify the /Yu option without a filename and fail to
     specify a hdrstop pragma, an error message is generated and the
     compilation is unsuccessful.
 
     See also: Using Precompiled Headers in PWB
                                    -♦-