VisualStudio 2015 RC问题,包括 [英] VisualStudio 2015 RC Issue with Includes

查看:80
本文介绍了VisualStudio 2015 RC问题,包括的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用VC ++应该是一个简单的问题,并且无法访问默认包含项,这使我大吃一惊.

Pulling out my hair on what should be a simple issue with using VC++ and being unable to access the default includes.

在安装Visual Studio 2015 RC之后,我无法再构建C/C ++项目.对于所有各种标准库* .h文件,我收到"IntelliSense:无法打开源文件'* .h'"错误.

After installing Visual Studio 2015 RC, I can no longer build C/C++ projects. I receive "IntelliSense: cannot open source file '*.h'" errors for all the various standard library *.h files.

我确认我的文件确实存在于默认位置(C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ include),并且如果我在编辑器中右键单击我的#include <cstdio>行,可以选择打开文档",它甚至可以在编辑器中自动打开.

I confirmed that my files do exist in the default locations (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include), and if I right-click on my #include <cstdio> line in the editor I can choose "Open Document" and it even opens automatically in the editor.

项目设置"中的我的包含目录"字符串是:

My Include Directories string in the Project Settings is:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;C:\Users\Kristopher\Libraries\Includes;$(VC_IncludePath);$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);‌

还有其他人遇到吗?我觉得自己正在忽略一些简单的事情.

Has anyone else run into this? I feel like I'm overlooking something simple.

推荐答案

您的IncludePath不应直接指定Visual C ++和Windows SDK包含路径.相反,它应该仅指定特定于您的项目的路径,并从通用C ++ MSBuild目标中定义的IncludePath派生.例如,

Your IncludePath should not specify the Visual C++ and Windows SDK include paths directly. Instead, it should specify only the paths specific to your project and derive from the IncludePath defined in the common C++ MSBuild targets. E.g.,

<IncludePath>C:\Users\Kristopher\Libraries\Includes;$(IncludePath)</IncludePath>

要解决您的特殊情况:在Visual C ++ 2015中,大部分C运行时(CRT)已重构为新的Windows操作系统组件Universal CRT.现在它的标头和库位于其他位置,您的项目无法将此包含路径包含到IncludePath属性中.具体来说,您需要包括$(UniversalCRT_IncludePath).有关更多详细信息,请参阅我今年早些时候写的文章通用CRT简介."

To address your particular case: In Visual C++ 2015, the bulk of the C Runtime (CRT) has been refactored into a new Windows operating system component, the Universal CRT. Its headers and libraries are now in a different location and your project fails to include this include path into the IncludePath property. Specifically, you need to include $(UniversalCRT_IncludePath). For more details, see the article I wrote earlier this year, "Introducing the Universal CRT."

这篇关于VisualStudio 2015 RC问题,包括的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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