Share via


Using Precompiled Headers in a Project

Previous sections present an overview of precompiled headers and reference material describing the manual precompiled-header options, /Yc and /Yu, the /Fp option, and the hdrstop pragma. This section describes a method for using the manual precompiled-header options in a project; it ends with an example makefile and the code that it manages.

For another approach to using the manual precompiled-header options in a project, study the makefile located in the \VC\MFC\SRC directory that is created during the default setup of Visual C++. The makefile takes a similar approach to the one presented in this section but makes greater use of Microsoft Program Maintenance Utility (NMAKE) macros to offer greater control of the build process.

Note   The techniques presented in this section do not apply when using the Automate Precompiled Header option (/YX).