我正在尝试在Visual Studio Express 2013中为Windows桌面(v12.0.30723.00 Update 3)创建C ++静态库。我不想在我的库中使用预编译的头文件。我无法获得没有错误即可编译的最基本的项目。
可以很容易地复制此问题,如下所示:
我收到以下两个错误:
1 error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? AssemblyInfo.cpp 39 1 ClassLibrary1
2 error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source? ClassLibrary1.cpp 7 1 ClassLibrary1
我错过了一步,还是在此版本的Visual Studio中发现错误?
有时,您可能会花费数小时在具有非常基本的解决方案的东西上挠头。在这种情况下,活动配置为“调试”,但我更改了“发布”配置的“预编译头”选项。当我在“调试”配置中更改选项时,瞧!没有更多的错误。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句