I'm trying to use IsWindows7SP1OrGreater function, declared in 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 by syntax checker correctly. What's the problem?
Yeah... Its right that VersionHelpers.h included in the VS2013 Windows 8.1 SDK.
For those using VS2012, you will have to redownload the Win 8.1 SDK and install it. Navigate to the Program Files(x86)\Windows Kits\8.1\Include\um. Copy all files and paste into 8.0\Include\um . Its better to skip all existing files. Reload VS
I had that problem myself, and I couldn't find the file anywhere on my disk.
Then I just realized the file seems to be included only in the Windows 8.1 SDK (and future SDKs to come I suppose), in the C:\Program Files (x86)\Windows Kits\8.1\Include\um
path. The doc doesn't mention that (so you don't need Visual Studio 2013 to be able to use it)
In order to use the version helpers macros, you need to be targetting the v120 platform toolset this ships with VS 2013. If you create a an empty project in VS 2013 then you will find that an include of VersionHelpers.h
works fine.
If you are targetting v120 then I guess something else is misconfigured in your project. Start with a brand new project and convince yourself that #include <VersionHelpers.h>
works as expected. Then try to find out what's different between your troublesome project, and the plain vanilla project that works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With