What is the difference between "Include Directories" and "Additional Include Directories"

Artium picture Artium · Jul 30, 2011 · Viewed 46.9k times · Source

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?

enter image description here enter image description here

Answer

Hans Passant picture Hans Passant · Jul 30, 2011

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.

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.

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.