c++ - Fresh installation of VS 2012 will not build default console application: Missing SDKDDKVer.h (and stdio.h / CRT) -
i have been using trial version of vs 2012 professional 1 month on windows 7 64-bit machine.
today, noticed platform toolset option (project properties) set visual studio 2010 (v100), seemed odd, because running vs 2012. changing "platform toolset" vs 2012 resulted in error noted in title of question:
cannot open include file: 'sdkddkver.h': no such file or directory
... while building stdafx.cpp (the error occurs in file targetver.h).
a forum discussion browsing earlier hinted presence of vs 2010 during vs 2012 install might have caused problem. (i not have links posts on hand.)
because have purchased vs 2012 professional, uninstalled trial version of vs 2012, , reinstalled paid version vs 2012 (professional) fresh download msdn website. told, uninstall/reinstall required 2 hours or so.
during reinstallation of vs 2012, paid close attention possible options, see if option might conceivably have caused vs 2012 installer "skip" vs 2012 header files or other vs 2012 components, , use vs 2010 components instead. find no such option.
reinstallation of vs 2012 successful.
i created new console project in new workspace (note "recent projects list" still showed recent vs 2012 projects, despite uninstall/reinstall). project settings new console project showed correct toolset being used - platform toolset = visual studio 2012 (v110).
unfortunately, building out-of-the-box vs 2012 console application (including precompiled header option, no other option in create project wizard), results in same error:
cannot open include file: 'sdkddkver.h': no such file or directory
what should do?
.
addendum: note future readers; after changing path settings (see comments beneath answer, below) vs 2012 finds sdkddkver.h, nonetheless fails find stdio.h, more serious problem because vc11 version of stdio.h (as vc11 crt headers) not available on machine anywhere.
unfortunately, microsoft has still not resolved these major bugs in vs 2012 installation process. only way found working vs 2012 installation including vc11 crt files to:
- wipe system clean of ms products (this may overkill, had @ least uninstall vs 2010 in addition uninstalling vs 2012)
- remove registry keys noted in comments answer below (to safe)
- delete residual directories (to safe)
- restart (to safe)
- install vs 2012 scratch from .iso, not installer (assuming installation files downloaded msdn site) (use program power2go mount .iso)
- then, absolutely sure install vs 2012 service pack 1 (through "windows update" control panel) (without doing step, vc11 crt headers still not installed anywhere on machine)
- and finally, map windows sdk library directories described in [this link](link points scam site, removed) (without doing latter step, linker fails finde path windows kernel library)
... there working installation of vs 2012.
thanks alot, microsoft.
after set visual studio 2013, had same sdk error simple c++ code. solve same problem below steps:
- select project properties>configuration>vc++ directories>include directories and add that: c:\program files (x86)\microsoft sdks\windows\v7.1a\include
- select project properties>configuration>vc++ directories>library directories and add that: c:\program files (x86)\microsoft sdks\windows\v7.1a\lib
after configuration had problem rc.exe link error. problem 1 more thing needed:
- copy rc.exe , rcdll.dll files c:\program files (x86)\microsoft sdks\windows\v7.1a\bin , past them c:\program files (x86)\microsoft visual studio 12.0\vc\bin
after configuration steps, can build simple "hello world!" example , run if lucky.
Comments
Post a Comment