missing header file on a new installation of visua

2019-01-15 07:17发布

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 SDKs\Windows\v8.0 or C:\Program Files (x86)\Microsoft SDKs\Windows\v8.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,

2条回答
The star\"
2楼-- · 2019-01-15 08:09

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.

查看更多
可以哭但决不认输i
3楼-- · 2019-01-15 08:22

The same problem also exists when you upgrade a VS2010 project to VS2012.

To me, manually fixing the include dirs (see step 1 in previous answer) took care of the problem.

查看更多
登录 后发表回答