title: Trouble linking boost libraries in Visial Studio 2010.
body: <p>I compiled my boost libraries according to the guide found <a href="https://stackoverflow.com/questions/2629421/how-to-use-boost-in-visual-studio-2010">here</a> and tried to use the boost filesystem library. </p>
  
  <p>When I add <code>#include &lt;boost\filesystem\operations.hpp&gt;</code> I get the following errors: </p>
  
  <pre><code>error LNK2028: unresolved token (0A00009A) "class boost::system::error_code __clrcall boost::filesystem2::detail::dir_itr_close(void * &amp;)" (?dir_itr_close@detail@filesystem2@boost@@$$FYM?AVerror_code@system@3@AAPAX@Z) referenced in function "public: __clrcall boost::filesystem2::detail::dir_itr_imp&lt;class boost::filesystem2::basic_path&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;,struct boost::filesystem2::path_traits&gt; &gt;::~dir_itr_imp&lt;class boost::filesystem2::basic_path&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;,struct boost::filesystem2::path_traits&gt; &gt;(void)" (??1?$dir_itr_imp@V?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@@detail@filesystem2@boost@@$$FQAM@XZ)
  error LNK2028: unresolved token (0A0000A2) "class boost::system::error_category const &amp; __clrcall boost::system::generic_category(void)" (?generic_category@system@boost@@$$FYMABVerror_category@12@XZ) referenced in function "void __clrcall `anonymous namespace'::`dynamic initializer for 'void __clrcall boost::system::posix_category::A0x6367c629(void)''(void)" (???__E?A0x6367c629@posix_category@system@boost@@YMXXZ@?A0x6367c629@@$$FYMXXZ)
  error LNK2028: unresolved token (0A0000A3) "class boost::system::error_category const &amp; __clrcall boost::system::system_category(void)" (?system_category@system@boost@@$$FYMABVerror_category@12@XZ) referenced in function "void __clrcall `anonymous namespace'::`dynamic initializer for 'void __clrcall boost::system::native_ecat::A0x6367c629(void)''(void)" (???__E?A0x6367c629@native_ecat@system@boost@@YMXXZ@?A0x6367c629@@$$FYMXXZ)
  error LNK2019: unresolved external symbol "class boost::system::error_code __clrcall boost::filesystem2::detail::dir_itr_close(void * &amp;)" (?dir_itr_close@detail@filesystem2@boost@@$$FYM?AVerror_code@system@3@AAPAX@Z) referenced in function "public: __clrcall boost::filesystem2::detail::dir_itr_imp&lt;class boost::filesystem2::basic_path&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;,struct boost::filesystem2::path_traits&gt; &gt;::~dir_itr_imp&lt;class boost::filesystem2::basic_path&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;,struct boost::filesystem2::path_traits&gt; &gt;(void)" (??1?$dir_itr_imp@V?$basic_path@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@Upath_traits@filesystem2@boost@@@filesystem2@boost@@@detail@filesystem2@boost@@$$FQAM@XZ)
  error LNK2019: unresolved external symbol "class boost::system::error_category const &amp; __clrcall boost::system::generic_category(void)" (?generic_category@system@boost@@$$FYMABVerror_category@12@XZ) referenced in function "void __clrcall `anonymous namespace'::`dynamic initializer for 'void __clrcall boost::system::posix_category::A0x6367c629(void)''(void)" (???__E?A0x6367c629@posix_category@system@boost@@YMXXZ@?A0x6367c629@@$$FYMXXZ)
  error LNK2019: unresolved external symbol "class boost::system::error_category const &amp; __clrcall boost::system::system_category(void)" (?system_category@system@boost@@$$FYMABVerror_category@12@XZ) referenced in function "void __clrcall `anonymous namespace'::`dynamic initializer for 'void __clrcall boost::system::native_ecat::A0x6367c629(void)''(void)" (???__E?A0x6367c629@native_ecat@system@boost@@YMXXZ@?A0x6367c629@@$$FYMXXZ)
  </code></pre>
  
  <p>If I compile without including operations.hpp it works fine. The thing is that when I use <code>#define BOOST_LIB_DIAGNOSTIC</code> It shows that it is linking in the boost libraries correctly: </p>
  
  <pre><code>Linking to lib file: libboost_filesystem-vc100-mt-gd-1_44.lib
  Linking to lib file: libboost_system-vc100-mt-gd-1_44.lib
  </code></pre>