在 Visual Studio 2015 中,我的 C++/CLI 项目出现以下错误:
"fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?"
我在项目选项中关闭了预编译 header ,但它一直给我同样的错误。我什至删除了预编译头文件的名称,但它仍然显示 "stdafx.h"
。
编辑: 是的,每个源文件都没有单独启用它。
最佳答案
好的。 Hans Passant 发现了发生的事情:
我用来构建它的构建配置仍然启用了预编译 header 。
关于C++ 预编译 header 已禁用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33849418/