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
786 views
in Technique[技术] by (71.8m points)

visual c++ - SDKDDKVer.h missing, but WinSDK installed? (c++ header issues)

So I recently returned to VC++ with .NET 4.5 (Visual Studio 2012 professional) due to various irrelevant reasons on a new PC after spending an eternity with web dev, python and c#. I'm pretty comfortable with the language as a whole, it's f**king beautiful in terms of syntax and I love the memory management freedom, pointers and references. I start up again with a "hello world" thing and BAM! Error.

As many other people get with this problem, I'm receiving the IntelliSense error when I try to compile and run:

cannot open source file "SDKDDKVer.h"" and the fatal error: "error C1083: Cannot open include file: 'SDKDDKVer.h': No such file or directory

I also have Visual Studio 2010 (C# Express) installed, perhaps that's screwing up some of my stuff. I've confirmed that my VC++ directories for incl and lib are all correct and that recommended by Microsoft and virtually any C++ developer. I attempted to install the most recent WinSDK (8.1) to get the header and all of it's functionality but I'm about 110% certain it's not in there. I'm installing the SDK for Win7 right now in hopes that it might reside in there (it's sure taking a long time though.)

My PC has the issue of terminally blue-screening only for any issue to be resolved upon leaving the machine alone for 15 minutes, so maybe it's a hard-drive issue?

Can any of you help? Absolutely any heads up, condescending, obvious or not will be appreciated a ton, and thanks for reading anyway.

EDIT: @MichaelBurr asked for the build log and I couldn't post it in its entirety at the bottom, so I figured I'd add it here.

Build started 14/03/2014 00:34:11.
 1>Project "c:UsersBrandondocumentsvisual studio 2012ProjectsConsoleApplication4ConsoleApplication4ConsoleApplication4.vcxproj" on node 2 (Build target(s)).
 1>C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V110Microsoft.CppBuild.targets(344,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
 1>ClCompile:
     C:Program Files (x86)Microsoft Visual Studio 11.0VCinCL.exe /c /ZI /nologo /W3 /WX- /sdl /Od /Oy- /D WIN32 /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Yc"stdafx.h" /Fp"DebugConsoleApplication4.pch" /Fo"Debug" /Fd"Debugvc110.pdb" /Gd /TP /analyze- /errorReport:prompt stdafx.cpp
     stdafx.cpp
 1>c:usersrandondocumentsvisual studio 2012projectsconsoleapplication4consoleapplication4argetver.h(8): fatal error C1083: Cannot open include file: 'SDKDDKVer.h': No such file or directory
 1>Done Building Project "c:UsersBrandondocumentsvisual studio 2012ProjectsConsoleApplication4ConsoleApplication4ConsoleApplication4.vcxproj" (Build target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:00:00.12

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

If above information couldn't solve your problem, I am proposing below steps from my VS2013 experiences:

  1. Select Project Properties>Configuration>VC++ Directories>Include Directories and add that: c:Program Files (x86)Microsoft SDKsWindowsv7.1AInclude
  2. Select Project Properties>Configuration>VC++ Directories>Library Directories and add that: c:Program Files (x86)Microsoft SDKsWindowsv7.1ALib

After that configuration I had problem about rc.exe link error. For this problem one more thing is needed:

  1. copy RC.exe and RcDll.dll files from C:Program Files (x86)Microsoft SDKsWindowsv7.1ABin and past them to C:Program Files (x86)Microsoft Visual Studio 12.0VCin After all those configuration steps, you can build a simple "Hello World!" example and run if you are lucky.

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

...