title: undefined reference to `boost::filesystem::detail::get_current_path_api(std::str
body: <p>Merry Christmas, everyone.</p>
  
  <p>Yesterday  I download the Boost library. i use CodeBlocks (with Mingw32 gcc V4.4.1)
   to compile it. The bjam command line is :
  bjam install --toolset=gcc--prefix="C:\zjc\PluginFramework\boost_1_42_0" --build-type=complete.
   and it is successful. 
  and i want to test the library. i write some code as follow: </p>
  
  <p><code></p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;iostream&gt;
  using std::cout;
  using std::wcout;
  using std::endl;
  #include &lt;string&gt;
  using std::string;
  using std::wstring;
  
  #include &lt;boost/algorithm/string.hpp&gt;
  #include &lt;boost/filesystem/path.hpp&gt;
  #include &lt;boost/filesystem/operations.hpp&gt;
  #include &lt;boost/format.hpp&gt;
  
  int main(int argc, char* argv[])
  {
      // ANSI character format
      cout &lt;&lt; boost::format( "%1% %2%" ) % "Hell" % "Low" &lt;&lt;endl;
      string s1 = boost::str( boost::format( "%2% %1%" ) % "Hell" % "Low" );
      cout &lt;&lt; s1 &lt;&lt; endl;
      // UNICODE character format
      wcout &lt;&lt; boost::wformat( L"%s %X" ) % L"-1 is" % -1 &lt;&lt; endl;
      wstring s2 = boost::str( boost::wformat( L"%2$s %1$.2f" ) % 3.141592 % L"Version" );
      wcout &lt;&lt; s2 &lt;&lt; endl;
      // get the path of application(ANSI character set), note:boost::filesystem::path
      string AnsiPath = boost::filesystem::initial_path&lt;boost::filesystem::path&gt;().string();
      cout&lt;&lt;AnsiPath&lt;&lt;endl;
       // get the path of application(unicode character set), note:boost::filesystem::wpath
      wstring UnicodePath = boost::filesystem::initial_path&lt;boost::filesystem::wpath&gt;().string();
      wcout&lt;&lt;UnicodePath&lt;&lt;endl;
      system("PAUSE");
      return 0;
  }
  </code></pre>
  
  <p></code></p>
  
  <p>one compile error occur: obj\Debug\main.o:C:\zjc\PluginFramework\boost_1_42_0\include\boost-1_42\boost\filesystem\operations.hpp|530|undefined reference to `boost::filesystem::detail::get_current_path_api(std::string&amp;)'|
       I have added the the library  at linker option:</p>
  
  <p>boost_system-mgw44-mt-d-1_42.lib</p>
  
  <p>libboost_system-mgw44-sd-1_42.lib</p>
  
  <p>boost_system-mgw44-d.lib</p>
  
  <p>boost_system-mgw44-d-1_42.lib</p>
  
  <p>boost_system-mgw44-mt-d-1_42.lib</p>
  
  <p>the macros:</p>
  
  <p>BOOST_ALL_DYN_LINK</p>
  
  <p>BOOST_SYSTEM_NO_LIB</p>
  
  <p>BOOST_SYSTEM_NO_DEPRECATED</p>
  
  <p>_DEBUG</p>
  
  <p>_CONSOLE</p>
  
  <p>BOOST_FILESYSTEM_VERSION</p>
  
  <p>BOOST_FILESYSTEM_DYN_LINK</p>
  
  <p>BOOST_LIB_DIAGNOSTIC</p>
  
  <p>I search the internet.the solution is linking the boost filesystem library.but i have linked the library. My Environment： Win 7 Home version, Code::Blocks V 10.05.</p>