SDKDDKVer.h缺失,但是WinSDK安装了? (c ++头问题) [英] SDKDDKVer.h missing, but WinSDK installed? (c++ header issues)

查看:4226
本文介绍了SDKDDKVer.h缺失,但是WinSDK安装了? (c ++头问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我最近回到了VC ++与.NET 4.5(Visual Studio 2012专业)由于各种不相关的原因,一个新的电脑后,与web开发,python和c#永恒。我对语言作为一个整体很舒服,它是f **国王美丽的语法,我喜欢的内存管理自由,指针和引用。我再次开始一个你好世界的东西和BAM!错误。

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.

很多其他人遇到这个问题,当我尝试编译和运行时,我收到IntelliSense错误:

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

无法打开源文件SDKDDKVer.h和致命错误:错误C1083:无法打开包含文件:'SDKDDKVer.h':没有这样的文件或目录

我也安装了Visual Studio 2010(C#Express),可能是我的一些东西。我已经确认,我的VC ++目录incl和lib都是正确的,并由微软和几乎任何C ++开发人员推荐。我试图安装最新的WinSDK(8.1)获得标题和所有的功能,但我大约110%确定它不在那里。我现在安装SDK for Win7现在希望它可能驻留在那里(它确定需要很长时间,虽然。)

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.)

我的电脑有问题的终端蓝屏只是为了解决任何问题,只需离开机器15分钟,这可能是一个硬盘驱动器的问题?

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?

你们能帮助吗?绝对任何头脑,condescending,明显或不会是一吨,并感谢阅读反正。

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

编辑:@MichaelBurr要求建立日志,我couldn'

@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:\Users\Brandon\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.vcxproj" on node 2 (Build target(s)).
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.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.0\VC\bin\CL.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"Debug\ConsoleApplication4.pch" /Fo"Debug\\" /Fd"Debug\vc110.pdb" /Gd /TP /analyze- /errorReport:prompt stdafx.cpp
     stdafx.cpp
 1>c:\users\brandon\documents\visual studio 2012\projects\consoleapplication4\consoleapplication4\targetver.h(8): fatal error C1083: Cannot open include file: 'SDKDDKVer.h': No such file or directory
 1>Done Building Project "c:\Users\Brandon\documents\visual studio 2012\Projects\ConsoleApplication4\ConsoleApplication4\ConsoleApplication4.vcxproj" (Build target(s)) -- FAILED.

建立失败。

:00:00.12

Time Elapsed 00:00:00.12

推荐答案

你发布的空白项目有同样的问题吗?
我已经尝试和建立您的项目使用Windows 7 32和64位和XP 32位。
所有构建正常,找到SDKDDKVer.h没有问题。

Do you have the same problem the blank project you posted? I have tried and built your project using Windows 7 32 and 64 bit and XP 32 bit. All builds fine, no problem with finding SDKDDKVer.h.

您的依赖路径设置必须有一些问题。

You must have some problem with your dependencies path settings.

您可能已经将VS设置从VS的一个安装转移到另一个,可能从32位到64位(反之亦然)?
如果是这种情况,请记住您的路径可能包含错误的文件夹名称。
对于32位系统,所有应用程序默认安装到C:\Program Files,而在64位计算机上,所有32位应用程序安装到程序文件(x86)。这是VS的情况。所有包含文件都在:

It is possible that you have transferred VS settings from one installation of VS to another, possibly from 32-bit to 64-bit (or vice versa) machine? If this is a case, remember that your path may include wrong folders names. For 32-bit system all applications are installed as default to C:\Program Files, while on 64-bit machine all 32bit apps are installed to Program Files (x86). This is a case for VS. All include files are in:


  • C:\Program文件(x86)\Microsoft SDKs\Windows \v7.0A\\ \\ Include -
    原始VS安装

  • C:\Program文件(x86)\Microsoft
    SDKs \Windows \v7.1A\Include - 安装7.1 VS SDK之后

如果您安装了其他SDK软件包,可能还有另一个文件夹包含SDKDDKVer.h:

If you have other SDK packages installed you may have another folders with SDKDDKVer.h:


  • C:\程序文件(x86)\Windows Kits\8.0\\\\\\\\\\\\\\\\\\\\\\\ C:\ Program Files(x86)\Windows Kits \8.0 \Include\shared

  • \\Include\shared

  • C:\Program文件(x86)\Windows Kits\8.1\\\\\\\\\\\\\\\\\\\\\\ :\Program Files\Microsoft SDKs\Windows\v6.0A\Include

  • C:\Program Files \Microsoft SDKs\Windows \v7.0\\ \\包括

  • C:\Program Files \Microsoft SDKs \Windows \v7.1 \Include

  • C:\Program Files (x86)\Windows Kits\8.0\Include\shared
  • C:\Program Files (x86)\Windows Kits\8.0\Include\shared
  • C:\Program Files (x86)\Windows Kits\8.0\Include\shared
  • C:\Program Files (x86)\Windows Kits\8.1\Include\shared
  • C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include
  • C:\Program Files\Microsoft SDKs\Windows\v7.0\Include
  • C:\Program Files\Microsoft SDKs\Windows\v7.1\Include

在您的项目设置中,您应该有以下路径包括:

In your project setting you should have the following paths for includes:


  • $(VCInstallDir)include

  • $(VCInstallDir)atlmfc\include

  • $(WindowsSDK_IncludePath)

注意使用宏。它们应该从父级的默认设置继承。
您可能已在属性管理器中覆盖路径设置,通过编辑保存在Microsoft.Cpp.Win32.user.props文件中的设置。

Note macros used. They should be inherited from parent’s default setrtings. You may have overridden path settings in Property manager, by editing setting saved in Microsoft.Cpp.Win32.user.props file.

如果您的项目从VS的早期版本转换,可能会发生。

It may have happened if your project is converted from earlier versions of VS.

这篇关于SDKDDKVer.h缺失,但是WinSDK安装了? (c ++头问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆