Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot open stdio.h

I upgraded Visual Studio from Community 2015 to Community 2017. Now when I build I get error messages saying 'Error (active) E1696 cannot open source file "stdio.h"' The referenced line looks like this:

#include <stdio.h>

If I create a new project, stdio.h is found.

So I looked at the project Configuration Properties->VC++ Directories and I see this:

Include Directories  $(VC_IncludePath);$(WindowsSDK_IncludePath);

So it seems that VC_IncludePath needs to be set but I can't find any place to set that. Note that I can't find Macro's and it may be because I'm using the free version of Visual Studio 2017.

Can someone please make a suggestion?

like image 787
Eddy Avatar asked Apr 09 '17 11:04

Eddy


People also ask

How do you fix Cannot open include file Stdio H?

Do this: Open your turboc2 folder you have tc.exe file inside, beside this file you find another file as named as ' tcinst.exe ' open it. Here you have to change the path of the directory to the path where your INCLUDE folder is located. Same way change the path to library directory also over restart your tc.exe.

Why Stdio H is not found?

<stdio. h> is one of the standard C headers. Your compiler complains that it can not find this header. This means that your standard library is broken.

Where is Stdio h in Windows?

The File Stdio. h is included in the path C:\Program Files (x86)\Windows Kits\10\Include\10.0. 17134.0\ucrt.


1 Answers

Seems like the Windows SDK Version you're trying to use is not installed on your PC. You should check the used SDK Version of your Project (in Properties) which can be changed to 10.0.14393.0

Also you can run your Visual Studio installer again and click Modify on your VS17 Version, go to Advanced and check if the required SDK is marked. If not mark it and install it.

like image 109
ZeraPain Avatar answered Sep 20 '22 15:09

ZeraPain