Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

missing header file on a new installation of visual studio 2012

I just installed visual studio 2012 and tried running my C++ project on it. compilation fails due to missing "SDKDDKVer.h", "windows.h", etc.

I installed the windows 8 sdk from Windows Software Development Kit (SDK) for Windows 8, but after successfully running the installer with the default components (including the windows headers), I can't find any include folder under C:Program Files (x86)Microsoft SDKsWindowsv8.0 or C:Program Files (x86)Microsoft SDKsWindowsv8.0A. I ran the SDK installer twice + tried to repair and still I can't find any trace of the windows header files.

Did anyone encounter something similar?

what am I missing? my OS is win7 x64. I uninstalled VS2010 before installing VS2012.

thanks,

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

It's a bug caused by VS2012 using the configuration of VS2010.

You have to manually fix the include libraries to get around this (through the property manager).

The substantial modifications needed are :

  1. adding $(WindowsSDK_IncludePath) to the include paths

  2. adding $(WindowsSDK_LibraryPath_x86) or $(WindowsSDK_LibraryPath_x64) to the library path depending if your building for x84 or x64.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...