“包含目录"和“包含目录"有什么区别?和“其他包含目录"

What is the difference between quot;Include Directoriesquot; and quot;Additional Include Directoriesquot;(“包含目录和“包含目录有什么区别?和“其他包含目录)
本文介绍了“包含目录"和“包含目录"有什么区别?和“其他包含目录"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

在我的项目的配置属性中,在VC++ 目录"下有一个包含目录"条目.但是在C/C++"选项下,还有一个条目叫做Additional Include Directories".库目录也会发生同样的事情.

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 安装程序自动预设.仅当您需要不寻常的目录搜索顺序时才修改它,将自定义位置放在最后.这样做很不寻常.

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.

这篇关于“包含目录"和“包含目录"有什么区别?和“其他包含目录"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

How do compilers treat variable length arrays(编译器如何处理变长数组)
Deduce template argument from std::function call signature(从 std::function 调用签名推导出模板参数)
check if member exists using enable_if(使用 enable_if 检查成员是否存在)
Standard Library Containers with additional optional template parameters?(具有附加可选模板参数的标准库容器?)
Uses of a C++ Arithmetic Promotion Header(C++ 算术提升标头的使用)
Parameter pack must be at the end of the parameter list... When and why?(参数包必须位于参数列表的末尾...何时以及为什么?)