我正在尝试在Visual Studio社区2017上构建解决方案,但我不断收到错误" 无法打开包含文件:'stdio.h' ".我已经阅读了几个类似的问题,但仍然无法解决这个问题.看起来在stdafx.h文件中调用了stdio.h文件.以下是更多细节.有什么建议?(我无法嵌入图片,所以请点击链接进行截图.)
系统详细信息:
Windows 10
Visual Studio Community 2017 v.15.2(26430.6)
- 使用C++安装的桌面开发(屏幕截图:安装列表)
第1步:我用C++编写了着名的Hello World程序.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
第2步:我点击了Build> Build Solution.
问题: 'stdio.h':没有这样的文件或目录.完全错误:
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>stdafx.cpp
1>c:\users\dahiana mini\desktop\learncpp\helloworld\helloworld\stdafx.h(10):
fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
1>Done building project "HelloWorld.vcxproj" -- …Run Code Online (Sandbox Code Playgroud) Hell'o我刚刚安装了Visual Studio 2017(企业版).我打开了我在Visual Studio 2015中创建的项目.我的项目使用了windows.h库但是VS2017找不到这个库.怎么修这个?