Cannot open include file: "VersionHelpers.h": no such file or directory

I am trying to use the IsWindows7SP1OrGreater function declared in the VersionHelpers.h header. And I get:

'VersionHelpers.h': no ​​such file or directory

although I can open this header from Visual Studio, it is found using the syntax check correctly. What is the problem?

+8
c ++ windows visual-studio winapi
source share
3 answers

To use version helper macros, you need to configure the v120 platform toolkit that ships with VS 2013. If you create an empty project in VS 2013, you will find that enabling VersionHelpers.h works fine.

If you are targeting v120, then I assume that something else is incorrectly configured in your project. Start with a completely new project and make sure that #include <VersionHelpers.h> works as expected. Then try to figure out what distinguishes your nasty project from a simple vanilla project.

+9
source share

I had this problem myself, and I could not find the file on my disk.

Then I realized that the file seems to be included only in the Windows 8.1 SDK (and future SDKs, presumably), in the path C:\Program Files (x86)\Windows Kits\8.1\Include\um . The document does not mention this (so you do not need Visual Studio 2013 to be able to use it)

+4
source share

Yes ... It is correct that VersionHelpers.h is included in the VS2013 Windows 8.1 SDK.

For those using VS2012, you will have to restart the Win 8.1 SDK and install it. Browse to the program files (x86) \ Windows Kits \ 8.1 \ Include \ um. Copy all the files and paste them into 8.0 \ Include \ um. It is better to skip all existing files. Update VS

+3
source share

All Articles