Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WindowsSdkDir is not set correctly in Visual Studio 2008?

I'm attempting to build some C++ code that requires the Windows 7.0 SDK header files and libraries. My VC++ Directories is set to:

$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(WindowsSdkDir)\include
$(WindowsSdkDir)\common\include
$(FrameworkSDKDir)include

My $(WindowsSdkDir) variable should be set to C:\Program Files\Microsoft SDKs\Windows\v7.0\ -- I've used the SDK's "Visual Studio Registration" configuration tool to set it, and it looks correct in the registry. I've checked under HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows (and the same in Wow6432Node.

Despite this, Visual C++ is still picking up header files from C:\Program Files\Microsoft SDKs\Windows\v6.0A\

What's wrong, and how do I fix it?

like image 625
Roger Lipscombe Avatar asked Jul 09 '09 09:07

Roger Lipscombe


1 Answers

Ah. Found this blog post: http://blogs.msdn.com/windowssdk/archive/2008/06/30/winsdk-bug-notification-sdk-config-tool-appears-to-work-but-fails.aspx

Essentially, the configuration tool only updates the HKEY_LOCAL_MACHINE settings; Visual Studio uses the HKEY_CURRENT_USER settings in preference.

like image 117
Roger Lipscombe Avatar answered Sep 18 '22 18:09

Roger Lipscombe