C/C++ Compiler (cl.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Creating a Project with Precompiled Headers
                                             Up Contents Index Back
─────Programmer's WorkBench─────────────────────────────────────────────────
 
     To create a PWB project that uses precompiled headers:
 
       1. Create a normal PWB project. Make sure to add at least one
          source file to the project file list. To specify the source
          file from which to generate the PCH file:
 
            ■  In the Edit Project dialog box, select that file in the
               file list and choose the To Top of List command.
 
       2. Choose the appropriate Compiler Options command from the
          Language Options cascaded menu (C or C++).
 
       3. Choose the Additional Global Options button.
 
       4. Turn on the Use Precompiled Header option.
 
          The cursor immediately moves to the Include File text box.
 
       5. Type the name of the last include file to be contained in the
          .PCH file. The .PCH file takes the base name of the specified
          include file and is created in the same directory as the
          project makefile.
 
          PWB automatically supplies /Yc<name> for the first file in the
          project and /Yu<name> for all files in the project.
 
     To change the source file on which the .PCH file is based, move or
     add the new file to the top of the project file list.
 
     The use of precompiled headers in a PWB project makefile is subject
     to certain restrictions.
     See: Using Precompiled Headers in PWB
 
     See
 
     Using Precompiled Headers with CL
                                    -♦-