問題描述
在我的項目的配置屬性中,在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.
這篇關于“包含目錄"和“包含目錄"有什么區別?和“其他包含目錄"的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!