title: VS10 "Additional Include Directories" Point to VS9 Includes
body: <p>I installed VS10 side-by-side with VS9 and created a very simple application using it:</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;vector&gt;
  #include &lt;algorithm&gt;
  using namespace std;
  
  class A
  {
  };
  class B : public A
  {
  };
  
  A* get_a() { return new B; }
  
  int main()
  {
      vector&lt;A*&gt; a_list;
      vector&lt;B*&gt; b_list;
  
      generate_n(back_inserter(a_list), 10, get_a);
  
      return 0;
  }
  </code></pre>
  
  <p>This generated a number of very odd compiler errors:</p>
  
  <pre><code>1&gt;hacks_vs10.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base_secure@std@@QBEXXZ) referenced in function "protected: void __thiscall std::vector&lt;class A *,class std::allocator&lt;class A *&gt; &gt;::_Tidy(void)" (?_Tidy@?$vector@PAVA@@V?$allocator@PAVA@@@std@@@std@@IAEXXZ)
  1&gt;hacks_vs10.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (__imp_??1_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty&lt;class std::allocator&lt;class A *&gt; &gt;::~_Container_base_aux_alloc_empty&lt;class std::allocator&lt;class A *&gt; &gt;(void)" (??1?$_Container_base_aux_alloc_empty@V?$allocator@PAVA@@@std@@@std@@IAE@XZ)
  1&gt;hacks_vs10.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;::~basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;(void)" (__imp_??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) referenced in function "protected: static void __cdecl std::vector&lt;class A *,class std::allocator&lt;class A *&gt; &gt;::_Xlen(void)" (?_Xlen@?$vector@PAVA@@V?$allocator@PAVA@@@std@@@std@@KAXXZ)
  1&gt;hacks_vs10.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;(char const *)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) referenced in function "protected: staticvoid __cdecl std::vector&lt;class A *,class std::allocator&lt;class A *&gt; &gt;::_Xlen(void)" (?_Xlen@?$vector@PAVA@@V?$allocator@PAVA@@@std@@@std@@KAXXZ)
  1&gt;hacks_vs10.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) referenced in function "public: __thiscall std::logic_error::logic_error(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)" (??0logic_error@std@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
  1&gt;hacks_vs10.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: char const * __thiscall std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;::c_str(void)const " (__imp_?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) referenced in function "public: virtual char const * __thiscall std::logic_error::what(void)const " (?what@logic_error@std@@UBEPBDXZ)
  1&gt;hacks_vs10.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (__imp_??0_Container_base_secure@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Container_base_aux_alloc_empty&lt;class std::allocator&lt;class A *&gt; &gt;::_Container_base_aux_alloc_empty&lt;class std::allocator&lt;class A *&gt; &gt;(class std::allocator&lt;class A *&gt;)" (??0?$_Container_base_aux_alloc_empty@V?$allocator@PAVA@@@std@@@std@@IAE@V?$allocator@PAVA@@@1@@Z)
  </code></pre>
  
  <p>...which made me scratch my head for some time, until I discovered that the wrong headers were being <code>#include</code>-ed.  Instead of the VS10 version of <code>&lt;vector&gt;</code> etc, the VS9 files are <code>#include</code>-ed.  This, in turn, I assume is because the <code>$(IncludePath)</code> variable is defined as:
  <img src="https://i.stack.imgur.com/vq77c.png" alt="alt text"></p>
  
  <p>When I went to <em>Tools>Options>Projects and Solutions>VC++ Directories</em> to change the global setting for this and all future projects, I discovered an unhappy truth:</p>
  
  <p><img src="https://i.stack.imgur.com/V9pYd.png" alt="alt text"></p>
  
  <p>So how do I change this global setting?  The installer clearly set it incorrectly.</p>