“包括目录”之间的区别是什么?和“附加包括目录” [英] What is the difference between "Include Directories" and "Additional Include Directories"

查看:209
本文介绍了“包括目录”之间的区别是什么?和“附加包括目录”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目的配置属性中,在VC ++目录下有一个条目包括目录。但在C / C ++选项下,还有另一个名为附加包含目录的条目。

In configuration properties of my project, under the "VC++ directories" there is an entry for "Include Directories". But under "C/C++" option, there is another entry called "Additional Include Directories". Same thing happens with library directories.

这两个条目有什么区别?

What are the difference between these two entries?


推荐答案

这是在VS2010中引入的尴尬。 VC ++目录设置以前位于工具+选项,项目和解决方案,VC ++目录。应用于在机器上构建的每个项目的全局设置。它仍然存在,但指出你现在应该在你的项目设置中更改它。 VS2010中构建引擎大修的副作用,使用msbuild进行构建。删除每个项目的设置是合乎逻辑的,但会破坏太多的现有项目。

This is awkwardness that got introduced in VS2010. The VC++ Directories settings used to be located in Tools + Options, Projects and Solutions, VC++ Directories. Global settings that applied to every project that was built on the machine. It is still there but points out that you should now change it in your project settings. A side-effect of the build engine overhaul in VS2010, enabling building with msbuild. Removing the per-project settings would have been logical but that would break too many existing projects.

因此,最好将VC ++目录设置视为机器默认。它由VS安装程序自动预设。 Tinker与它只有如果你需要一个不寻常的目录搜索顺序,把自定义位置最后。非常不寻常这样做。

As such, it is probably best to treat the VC++ Directories settings as the machine default. It is automatically preset by the VS installer. Tinker with it only if you need an unusual directory search order, putting the custom locations last. Very unusual to do so.

它可以工作。它确实得到了利用的最终。在VS2012及更高版本中授权平台工具集设置。不同的编译器,不同的链接器,不同的#include目录,不同的链接器搜索路径。只需一个设置修改,很好。

It does work however. And it did get taken advantage of eventually. Empowering the Platform Toolset setting in VS2012 and up. Different compiler, different linker, different #include directories, different linker search path. Modified with just one setting, nice.

这篇关于“包括目录”之间的区别是什么?和“附加包括目录”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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