BUG: You receive a "fatal error C1852" error message when combining compiler switches /Yc and /Yu with the /YX option in Visual C++ (122304)
The information in this article applies to:
- Microsoft Visual C++ 2.0
- Microsoft Visual C++ 2.1
- Microsoft Visual C++ 4.0
- Microsoft Visual C++ 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
This article was previously published under Q122304 SYMPTOMS Combining compiler switches /Yc and /Yu with the /YX option
causes the following error:
fatal error C1852: <PCH_file_name> is not a valid precompiled
header file
Error executing cl.exe.
CAUSE In the example given in the More Information section, the
/YX switch forces a new PCH file to be generated for the newly added source
file. The project files that use the /Yu switch are dependent on the file built
using the /Yc compiler switch. They will be recompiled because the precompiled
header is newer than their OBJ files. The error is generated because the
requirements for the PCH files are not met. STATUS Microsoft has confirmed this to be a bug in the products
listed at the beginning of this article. This problem was corrected in
Microsoft Visual C++, version 6.0.
Modification Type: | Major | Last Reviewed: | 6/3/2005 |
---|
Keywords: | kbtshoot kberrmsg kbBug kbfix kbide kbVC600fix KB122304 kbAudDeveloper |
---|
|