Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 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,

like image 815
OSH Avatar asked Oct 07 '12 16:10

OSH


1 Answers

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.

like image 196
OSH Avatar answered Oct 07 '22 10:10

OSH