Wednesday, August 19, 2020

Fixing Visual Studio 2017 "can't find windows.h, stddef.h, string.h" Error

 The error in the title (in most cases) is caused by differing version between the target of the VS2017 project build settings and the version of Windows SDK installed in the computer used to compile your code. Each version of Windows SDK creates its own directory structure in your computer which made VS2017 IDE points to the wrong path (or in my case non-existent path). My solution to fix this errors as follows :

  1. Open VS2017 project properties
  2. Into General | Windows SDK Version
  3. Pick the correct version of installed Windows SDK version (in my case, version: 10.0.17763.0) instead  of  whatever version was set there previously.

The following is the screenshot of the project option, in case it's not clear enough. The aforementioned option is circled in blue.


Hope this helps because I scratched my head for half an hour just to find what went wrong :( . 


Post a Comment

No comments: