What Is Sdkddkver.H For

what is SDKDDKVer.h for?

targetver.h and SDKDDKVer.h are used to control what functions, constants, etc. are included into your code from the Windows headers, based on the OS that you want your program to support. I believe that targetver.h sets defaults to using the latest version of Windows unless the defines are specified elsewhere.

SDKDDKVer.h is the header file that actually defines the #defines that represent each version of Windows, IE, etc.

What is sdkddkver.h?

It's a rather important Windows SDK header file, the very first one that gets #included in <windows.h>. It declares Windows version numbers, the kind you should use in your program that states what version of Windows you want to be compatible with. The MSDN Library article is here.

If this file is actually missing on your machine (it isn't clear from the question) then you've either got a very old SDK version and are mixing headers (very bad) or you've got some disk damage (very very bad). It is the kind of problem you'd get when you are stuck on an ancient version of Visual Studio and are trying to use modern Windows api functions. Do not mix and match, it won't come to a good end.

Visual Studio 2013 SDKDDKVer.h and related errors

Downloading and installing the Windows 8.1 SDK (on a machine that is never online, grr...) solved all problems with no further action necessary. Probably the problem was caused by not being online during install of visual studio. I wonder why the VS 2013 installer doesn't come up with an explicit message before VS is installed. Something like : "EMERGENCY WARNING!!! YOU ARE NOT ONLINE!!! NOTHING WILL WORK PROPERLY!!! YOU ABSOLUTELY MUST INSTALL WINDOWS SDK 8.1 AT SOME POINT BEFORE ANYTHING WILL WORK!!!! I'M NOT KIDDING!!! REALLY!!!"

Something like that anyway....Oh, and this is obviously the best answer, which I will mark as such if I'm allowed to...

SDKDDKVer.h missing, but WinSDK installed? (c++ header issues)

Do you have the same problem the blank project you posted?
I have tried and built your project using Windows 7 32 and 64 bit and XP 32 bit.
All builds fine, no problem with finding SDKDDKVer.h.

You must have some problem with your dependencies path settings.

It is possible that you have transferred VS settings from one installation of VS to another, possibly from 32-bit to 64-bit (or vice versa) machine?
If this is a case, remember that your path may include wrong folders names.
For 32-bit system all applications are installed as default to C:\Program Files, while on 64-bit machine all 32bit apps are installed to Program Files (x86). This is a case for VS. All include files are in:

  • C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include -
    original VS installation
  • C:\Program Files (x86)\Microsoft
    SDKs\Windows\v7.1A\Include - after installing 7.1 VS SDK

If you have other SDK packages installed you may have another folders with SDKDDKVer.h:

  • C:\Program Files (x86)\Windows Kits\8.0\Include\shared
  • C:\Program Files (x86)\Windows Kits\8.1\Include\shared
  • C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
  • C:\Program Files\Microsoft SDKs\Windows\v7.0\Include
  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Include

In your project setting you should have the following paths for includes:

  • $(VCInstallDir)include
  • $(VCInstallDir)atlmfc\include
  • $(WindowsSDK_IncludePath)

Note macros used. They should be inherited from parent’s default setrtings.
You may have overridden path settings in Property manager, by editing setting saved in Microsoft.Cpp.Win32.user.props file.

It may have happened if your project is converted from earlier versions of VS.

Cannot open source file SDKDDKVer.h in Visual Studio

I try to repair the Visual Studio from the control panel and everything is fine now.

The installing process need network connection, if some period of the installing process is offline, some configuration errors may occur.

What does the `Target Platform Version` mean for a VS C++ project?

In Visual Studio 2015 the Target Platform Version field just sets the version of the Windows SDK to use. See this MSDN article for reference. In Visual Studio 2019, this field has been renamed Windows SDK Version. You still need to set _WIN32_WINNT, WINVER, and NTDDI_VERSION macros, as well as the Platform Toolset field. Taken together they determine the versions of Windows your app can run on.

If your applications need to run on Windows XP, you have to pick a Platform Toolset ending in _xp, select an older Windows SDK Version (you need 7.1A, but picking 7.0 or 8.1 should work; see below), and set _WIN32_WINNT, WINVER, and NTDDI_VERSION macros accordingly. See this Stack Overflow posting for tips on setting these macros and including related SDK headers via targetver.h.

If building from a Command Prompt with an _xp platform toolset see this Stack Overflow posting for tips on setting the /SUBSYSTEM linker option and for defining _USING_V110_SDK71_.

Windows SDKs are backward-compatible, but I haven't yet found a clear reference which lists the oldest version of Windows you can target when building with a given version of the Windows SDK (see EDIT at the bottom of this post). Each SDK lists "System Requirements", but these list the minimum version of Windows needed to develop with the SDK, not the minimum version of Windows that executables built with that SDK can target. The best reference I know of is the sdkddkver.h header in each of the newer Windows SDKs. Within this header are a list of _WIN32_WINNT version constants. For example, in the Windows 7.1A SDK, sdkddkver.h defines _WIN32_WINNT_NT4 as the oldest supported Windows platform (but I do not know if this is definitive).

The rest of this answer are notes regarding targeting for native VC++ apps using Visual Studio 2019. These notes may apply to older Visual Studio versions as well.


In Visual Studio 2019, selecting a Platform Toolset which ends in _xp has certain quirks. For v120_xp, the Windows SDK Version field is hidden, but the inherited VC++ Directories will show that the Windows SDK 7.1A directory is specified. For v140_xp and v141_xp platform toolsets, you can pick Windows SDK 7.0 or 8.1 (for either, the inherited VC++ Directories will show that the Windows SDK 7.1A directory is specified).

I am not sure what the difference is - if any - between specifying Windows SDK Version 7.0 or 8.1 when using Platform Toolset v140_xp or v141_xp in Visual Studio 2019.

In Visual Studio 2019, when setting native C++ project properties for a Windows Desktop app, depending on the Platform Toolset you select, the read-only Target Platform field may change to "Windows 10". But this DOES NOT mean your Win32 desktop app will be built as a Universal Windows Platform app. It will still work on older versions of Windows depending on the Platform Toolset, Windows SDK Version and the values for the _WIN32_WINNT, WINVER, and NTDDI_VERSION macros.

Microsoft could update VS2019 so the Target Platform field value would show just "Windows" when setting properties for Win32/desktop projects, regardless of the selected Platform Toolset or Windows SDK Version.

EDIT: See the article A Brief History of Windows SDKs from Chuck Walbourn, Senior Engineer for Xbox at Microsoft, for details regarding backward compatibility of various Windows SDKs.



Related Topics



Leave a reply



Submit