Cannot open include file: 'stdio.h' - Visual Studio Community 2017 - C++ Error

dahiana picture dahiana · May 27, 2017 · Viewed 177.3k times · Source

I am trying to Build a Solution on Visual Studio Community 2017, but I keep getting the error "Cannot open include file: 'stdio.h' ". I've read through several similar questions, but still can't fix this problem. Looks like the stdio.h file is called in the stdafx.h file. Below are more details. Any suggestions? (I can't embed images yet, so please click on the links for screenshots.)

System details: Windows 10
Visual Studio Community 2017 v.15.2 (26430.6)
-- Installed Desktop Development with C++ (Screenshot: Installation list)


Step 1: I wrote the famous Hello World program in C++.

#include "stdafx.h"
#include <iostream>
using namespace std;

int main()
{
    cout << "Hello World!" << endl;
    return 0;
}

Step 2: I clicked on Build > Build Solution.

Problem: 'stdio.h': No such file or directory

Answer

Maxim Akristiniy picture Maxim Akristiniy · Jun 26, 2017

Got same problem with project porting from VS2013 to VS2017,
Fix: change "Properties->General->Windows SDK Version" to 10