precompiled header file is previous version of the compiler, or the precompiled header is C++ and you are using it from C

Post date: May 11, 2011 9:17:14 AM

Resolution I

For projects with a single C source file and multiple C++ source files (or vice-versa), use the following steps to disable precompiled headers for the single source file:

Resolution II

For projects with multiple C and C++ source files, use the following steps to disable precompiled headers for a set of source files procedure:

With Visual C++ version 2.x:

This will disable precompiled headers for a set of source files. However, source files in subsequent additions to this group may need the PCH usage disabled depending on the file's previous settings.

With Visual C++ version 4.0, groups are no longer supported. To disable the use of precompiled headers for a group of source files, follow the the steps of Resolution I, but in step 2 hold down the CRTL key while selecting each file.

Resolution III

For projects not requiring precompiled headers, follow the steps of Resolution I, but in step 2 select all targets from the project tree in the left pane.

Resolution IV (VC 4.x and 5.0)

This will allow you to specify a pre-compiled header for the top-level project (.CPP files), and a different pre-compiled header for the subproject (.C files).

- reference Microsoft