Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
542 views
in Technique[技术] by (71.8m points)

winapi - 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)atlmfcinclude
$(WindowsSdkDir)include
$(WindowsSdkDir)commoninclude
$(FrameworkSDKDir)include

My $(WindowsSdkDir) variable should be set to C:Program FilesMicrosoft SDKsWindowsv7.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 HKLMSOFTWAREMicrosoftMicrosoft SDKsWindows (and the same in Wow6432Node.

Despite this, Visual C++ is still picking up header files from C:Program FilesMicrosoft SDKsWindowsv6.0A

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...