title: VS2010 Unresolved External Symbol boost::asio::detail::winsock_init_base::throw_on_error when linking boost-system with a project using libtorrent
body: <p>I'm trying to build a small command line BitTorrent client using Rasterbar's libtorrent, which depends on Boost.  I've built both the Boost libraries and the libtorrent library using their respective directions, but when I try to build my project I get the following linking errors</p>
  
  <pre><code>1&gt;------ Build started: Project: MiniBT, Configuration: Debug Win32 ------
  1&gt;MiniBT.obj : error LNK2019: unresolved external symbol "protected: static void __cdecl boost::asio::detail::winsock_init_base::throw_on_error(struct boost::asio::detail::winsock_init_base::data &amp;)" (?throw_on_error@winsock_init_base@detail@asio@boost@@KAXAAUdata@1234@@Z) referenced in function "public: __thiscall boost::asio::detail::winsock_init&lt;2,0&gt;::winsock_init&lt;2,0&gt;(bool)" (??0?$winsock_init@$01$0A@@detail@asio@boost@@QAE@_N@Z)
  1&gt;MiniBT.obj : error LNK2019: unresolved external symbol "protected: static void __cdecl boost::asio::detail::winsock_init_base::startup(struct boost::asio::detail::winsock_init_base::data &amp;,unsigned char,unsigned char)" (?startup@winsock_init_base@detail@asio@boost@@KAXAAUdata@1234@EE@Z) referenced in function "public: __thiscall boost::asio::detail::winsock_init&lt;2,0&gt;::winsock_init&lt;2,0&gt;(bool)" (??0?$winsock_init@$01$0A@@detail@asio@boost@@QAE@_N@Z)
  1&gt;MiniBT.obj : error LNK2019: unresolved external symbol "class boost::system::error_category const &amp; __cdecl boost::asio::error::get_misc_category(void)" (?get_misc_category@error@asio@boost@@YAABVerror_category@system@3@XZ) referenced in function "void __cdecl boost::asio::error::`dynamic initializer for 'misc_category''(void)" (??__Emisc_category@error@asio@boost@@YAXXZ)
  1&gt;MiniBT.obj : error LNK2019: unresolved external symbol "unsigned long __cdecl boost::asio::detail::win_tss_ptr_create(void)" (?win_tss_ptr_create@detail@asio@boost@@YAKXZ) referenced in function "public: __thiscall boost::asio::detail::win_tss_ptr&lt;class boost::asio::detail::call_stack&lt;class boost::asio::detail::win_iocp_io_service,unsigned char&gt;::context&gt;::win_tss_ptr&lt;class boost::asio::detail::call_stack&lt;class boost::asio::detail::win_iocp_io_service,unsigned char&gt;::context&gt;(void)" (??0?$win_tss_ptr@Vcontext@?$call_stack@Vwin_iocp_io_service@detail@asio@boost@@E@detail@asio@boost@@@detail@asio@boost@@QAE@XZ)
  1&gt;MiniBT.obj : error LNK2019: unresolved external symbol "protected: static void __cdecl boost::asio::detail::winsock_init_base::cleanup(struct boost::asio::detail::winsock_init_base::data &amp;)" (?cleanup@winsock_init_base@detail@asio@boost@@KAXAAUdata@1234@@Z) referenced in function "public: __thiscall boost::asio::detail::winsock_init&lt;2,0&gt;::~winsock_init&lt;2,0&gt;(void)" (??1?$winsock_init@$01$0A@@detail@asio@boost@@QAE@XZ)
  </code></pre>
  
  <p>It seems to indicate that the asio::detail namespace didn't get included in the boost-system library as it is only those 5 symbols that it seems to have a problem with and it is linking to the boost-system library just fine otherwise. I'm trying to build a 32-bit application on a 64-bit system, but everything I've checked seems to be correctly configured for this.</p>
  
  <p>I know I'm missing something, but I can't seem to figure out what.  Does anyone have any suggestions?</p>