2

I've been working on my game engine for a while and for some reason all of a sudden I came up with an error that many header files are missing. I checked the console and there is no errors in the code and also I already compiled the project before. It happened after I removed Windows files from my old disc that I dont use as primary disc anymore and visual studio mightve used those files from that path. I already tried repairing Visual Studio but it didn't fix the problem. Here is a screenshot of the errors: Errors showing that header files cannot be found

ANSWER: The Windows SDK was missing and so, the files couldn't be found. I downloaded the sdk from here

ERNEST 326
  • 31
  • 4
  • Is your include folder correct? – Ali Kanat Dec 06 '19 at 13:05
  • Yes, my include folder has glfw, gl, assimp and glm which are all meant to be included in project – ERNEST 326 Dec 06 '19 at 13:08
  • @ERNEST326 Whoops I didn't see the source code, my bad. Out of interest, what are the column headers for that error table? – Ben Dec 06 '19 at 13:16
  • 1
    @ERNEST326 the errors are mostly about C standard headers. Are you sure you haven't removed Windows SDK files by accident? Do you have references to your old disc anywhere in the solution? – Dan M. Dec 06 '19 at 13:26
  • 1
    I most likely removed the windows sdk that visual studio used. I got the files on anoter disc but not sure how to change path for windows sdk – ERNEST 326 Dec 06 '19 at 14:12
  • The Windows SDK file was missing so thats the reason why my project didnt work. Thanks for your help! – ERNEST 326 Dec 06 '19 at 14:26

2 Answers2

6

For your project, go to Project->Properties and verify that the project is set to use a version of Windows SDK that is installed on the General tab as well as a platform toolset that is installed. Also make sure that at the dropdowns at the top for configuration/platform are the environment you are currently testing in (ex. Debug x86 would be Debug Win32).

user2980207
  • 293
  • 1
  • 11
1

Also make sure the include / library path don't contain any space. After I moved the project to a spaceless path, and replaced the content in .vcxproj, header files were loaded.

klenium
  • 2,468
  • 2
  • 24
  • 47