Cannot open Windows.h in Microsoft Visual Studio

后端 未结 7 1550
滥情空心
滥情空心 2020-12-03 06:33

First of all: I\'m using Microsoft Visual Studio 2012

I am a C#/Java developer and I am now trying to program for the kinect using Microsoft SDK and C++. So I starte

7条回答
  •  再見小時候
    2020-12-03 07:10

    If you are targeting Windows XP (v140_xp), try installing Windows XP Support for C++.

    Starting with Visual Studio 2012, the default toolset (v110) dropped support for Windows XP. As a result, a Windows.h error can occur if your project is targeting Windows XP with the default C++ packages.

    Check which Windows SDK version is specified in your project's Platform Toolset. (Project → Properties → Configuration Properties → General). If your Toolset ends in _xp, you'll need to install XP support.

    Open the Visual Studio Installer and click Modify for your version of Visual Studio. Open the Individual Components tab and scroll down to Compilers, build tools, and runtimes. Near the bottom, check Windows XP support for C++ and click Modify to begin installing.

    See Also:

    • How to target Windows XP in Microsoft Visual Studio C++
    • What's the difference between Platform Toolsets v140 and v140_xp?

提交回复
热议问题