在VC6.0中,如果stdafx.cpp中不包含stdafx.h,而是包含其他的头文件,就会出现下面的错误提示
error C2857: '#include' statement specified with the /Ycstdafx.h command-line option was not found in the source file
解决这个问题,仅仅在C++选项中,Precompiled Header>Use Precompiled Header file 中填写其他的头文件是不能解决的。
还需要手动修改工程文件*.dsp,把其中的Yc stdafx.h修改为Yc xx.h , Yu stdafx,h 修改为Yu xx.h;
这样重新编译才能OK。
本文介绍了解决VC6.0环境下,由于stdafx.cpp未包含正确的预编译头文件(stdafx.h)而引发的编译错误的具体步骤。除调整C++选项外,还需手动更改工程文件(*.dsp)中的指定头文件。
1704

被折叠的 条评论
为什么被折叠?



