新安装的 Visual Studio 2012 缺少头文件 [英] missing header file on a new installation of visual studio 2012

查看:51
本文介绍了新安装的 Visual Studio 2012 缺少头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了 Visual Studio 2012 并尝试在其上运行我的 C++ 项目.由于缺少SDKDDKVer.h"、windows.h"等,编译失败

I just installed visual studio 2012 and tried running my C++ project on it. compilation fails due to missing "SDKDDKVer.h", "windows.h", etc.

我从 适用于 Windows 8 的 Windows 软件开发工具包 (SDK) 安装了 Windows 8 sdk,但是在使用默认组件(包括 Windows 标头)成功运行安装程序后,我在 C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0 或 C:\ 下找不到任何包含文件夹程序文件 (x86)\Microsoft SDKs\Windows\v8.0A.我运行了两次 SDK 安装程序 + 尝试修复,但仍然找不到任何 Windows 头文件的痕迹.

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?

我错过了什么?我的操作系统是 win7 x64.我在安装 VS2012 之前卸载了 VS2010.

what am I missing? my OS is win7 x64. I uninstalled VS2010 before installing VS2012.

谢谢,

推荐答案

这是一个 使用VS2010的配置导致VS2012的bug.

您必须手动修复包含库才能解决此问题(通过属性管理器).

You have to manually fix the include libraries to get around this (through the property manager).

需要的实质性修改是:

  1. $(WindowsSDK_IncludePath) 添加到包含路径

添加 $(WindowsSDK_LibraryPath_x86)$(WindowsSDK_LibraryPath_x64)到库路径,具体取决于您的构建是针对 x84 还是 x64.

adding $(WindowsSDK_LibraryPath_x86) or $(WindowsSDK_LibraryPath_x64) to the library path depending if your building for x84 or x64.

这篇关于新安装的 Visual Studio 2012 缺少头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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