在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。
转载请注明原文地址: https://ju.6miu.com/read-1298820.html