1

I have been trying to figure out this error for a while now but I cannot find anything, whenever I try to build my program I get the error:

C1083: Cannot open include file: 'corecrt.h' No such file or directory.

edit: I added $(UniversalCRT_IncludePath) into additional include directories but I still get the error.

Attempting to add into additional include directories

Code and Error Here

Tylv
  • 29
  • 1
  • 8
  • Possible duplicate of [How do include paths work in Visual Studio?](http://stackoverflow.com/questions/2676417/how-do-include-paths-work-in-visual-studio) – Ken Y-N Jul 26 '16 at 06:52
  • **Don't** post code and error messages as images. Post as **text** *directly* in the question. – Jesper Juhl Jul 26 '16 at 07:14
  • I posted the error in text the code is irrelevant as there is nothing wrong with the code itself @JesperJuhl – Tylv Jul 26 '16 at 08:26

1 Answers1

1

You should check Additional Include Directories parameter for your C++ project.

To do that, go Project -> Properties -> C/C++ and add $(UniversalCRT_IncludePath) to Additional Include Directories parameter.

More information about Universal CRT can be found here.

Nikita
  • 6,270
  • 2
  • 24
  • 37
  • I did that you can find the photo in my question, is it correct? @Nikita – Tylv Jul 26 '16 at 08:22
  • @Tylv Yes, it's correct. If it's not working, check `VC++ Directories`. It should contains `$(VC_IncludePath)`. This macros should point to your Windows 10 Kit ucrt include folder. – Nikita Jul 26 '16 at 08:50
  • @Tylv I mean `VC++ Directories -> Include Directories` – Nikita Jul 26 '16 at 08:58
  • in my include directories for vc++ it says $(VC_IncludePath);$(WindowsSDK_IncludePath); I believe this to be the correct – Tylv Jul 26 '16 at 09:47
  • @Tylv Check how `$(VC_IncludePath)` macros is interpreted. To do that click Macros button at `Include Directories` parameters page. You should see value as a full directory path, e.g. `c:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt` – Nikita Jul 26 '16 at 09:52
  • just running an update to see if that helps, do you have an email I can contact you on if I am still having issues or is it easiest to contact you on here? – Tylv Jul 26 '16 at 10:13
  • @Tylv It's better to contact here – Nikita Jul 26 '16 at 10:20
  • @Tylv By the way, check that you have [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) installed – Nikita Jul 26 '16 at 10:22
  • Perfect, will update you as soon as possible, it's a big update though @Nikita – Tylv Jul 26 '16 at 10:22
  • I definitely do have Windows 10 SDK installed – Tylv Jul 26 '16 at 10:23