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

后端 未结 12 1752
误落风尘
误落风尘 2020-12-15 02:27

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

12条回答
  •  情歌与酒
    2020-12-15 03:10

    Scenario:

    1. Windows 10 with Visual Studio 2017 (FRESH installation).

    2. 'C' project (ERROR like -> cannot open source file: 'stdio.h', 'windows.h', etc.).

    Resolve:

    1. Run 'Visual Studio Installer'.

    2. Click button 'Modify'.

    3. Select 'Desktop development with C++'.

    4. From "Installation details"(usually on the right-sidebar) select:

      4.1. Windows 10 SDK(10.0.17134.0).

      • Version of SDK in 4.1. is just for example.
    5. Click button 'Modify', to apply changes.

    6. Right-click 'SomeProject' -> 'Properties'.
    7. 'Configuration:' -> 'All Configurations' and 'Platform:' -> 'All Platforms'.
    8. 'Configuration Properties' -> 'General' -> 'Windows SDK Version':
      • change(select from combobox) SDK version to currently installed;
    9. Click button 'Apply', to apply changes.

提交回复
热议问题