所以,我刚刚安装了Visual Studio 2015.我的操作系统是Windows 8.1 Embedded(来自Dreamspark),我似乎无法运行简单的Hello world程序而不会出现错误。 (确切地说是443)。这是一个
Error (active) the global scope has no "log10l" Project1 c:\Program Files (x86)\Program Files\VC\include\cmath 675
Error (active) cannot open source file "errno.h" Project1 c:\Program Files (x86)\Program Files\VC\include\cerrno 14
Error (active) cannot open source file "float.h" Project1 c:\Program Files (x86)\Program Files\VC\include\cfloat 7
Error (active) cannot open source file "math.h" Project1 c:\Program Files (x86)\Program Files\VC\include\cmath 12
Error (active) the global scope has no "acosf" Project1 c:\Program Files (x86)\Program Files\VC\include\xtgmath.h 210
...
... And so on
...
Error (active) explicit type is missing ('int' assumed) Project1 c:\Program Files (x86)\Program Files\VC\include\xtgmath.h 211
Error (active) explicit type is missing ('int' assumed) Project1 c:\Program Files (x86)\Program Files\VC\include\xtgmath.h 212
Error C1083 Cannot open include file: 'corecrt.h': No such file or directory Project1 c:\program files (x86)\program files\vc\include\crtdefs.h 10
我的猜测是头文件可能有问题,但我重新安装了Visual Studio,但没有任何帮助。它可能与操作系统有关吗?我习惯在Windows 10的笔记本电脑上运行Visual Studio 2013,但我的新电脑在Dreamspark的Windows 8.1 Embedded上运行Visual Studio 2015。
为了确保,这是我用来测试VS的简单代码。
#include <iostream>
int main() {
std::cout << "Hello" << std::endl;
return 0;
}
希望有人能指出我的解决方案。谢谢你的阅读。
答案 0 :(得分:2)
Visual Studio 2015使用Universal C Runtime。根据您遇到的错误,您已安装c:\Program Files (x86)\Program Files\VC\include
,但您的包含路径中缺少C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt
。
答案 1 :(得分:0)
我转到了Project-&gt; Properties-&gt; Configuration Properties-&gt; General并将Windows SDK版本更改为最新版本(它是8.1,我将其更改为10.0.10586.0)并清理了u