Share via


NTNOPCH

Use the NTNOPCH macro to turn off the precompiled headers option for a single source file.

If you have precompiled headers on a subdirectory, the Build utility expects you to build that subdirectory and to make subsequent changes as you go along. When you change one of the source files, you must rebuild that file. The Build utility detects the use of precompiled headers and compiles that single source file without them.

If you set:

NTNOPCH=1

this enables you to build everything, and then to change a definition in a header file (for example, a #define something to something else). Then you can change the source file to use that new definition. Of course, you do not want to regenerate the precompiled header and rebuild everything else. It is better to rebuild that one source file, without using the old precompiled header. This macro tells the Build utility to turn off precompiled headers for this source file.

The Build utility will reread all the headers and use the new header information. This also requires using the -Z or -z command-line switches, so that the Build utility will not scan dependencies and therefore will not regenerate the precompiled header.

 

 

Send comments about this topic to Microsoft

Build date: 5/3/2011