title: boost static link boost.locale error
body: <pre><code>#include &lt;boost/locale/encoding.hpp&gt;
  int main()
  {
      const std::string strutf8("你好，世界");
      std::wstring wtrutf16 = boost::locale::conv::to_utf&lt;wchar_t&gt;(strutf8, "UTF-8");
  
      return 0;
  }
  </code></pre>
  
  <p>this is my code, i want to use boost.locale lib in my project on centos 7 64 bit system, i compile the boost library using ./bootstrap and ./b2,i works fine except i static link libboost_locale.a,i compile in console using: </p>
  
  <pre><code>g++ -o locale locale.cpp -static -L ~/Downloads/boost_1_57_0/stage/lib -lboost_system -lboost_filesystem -lboost_locale
  </code></pre>
  
  <p>the gcc shows the error like this:</p>
  
  <pre><code>/root/Downloads/boost_1_57_0/stage/lib/libboost_locale.a(codepage.o)：in fuction ‘boost::locale::conv::impl::uconv_to_utf&lt;wchar_t&gt;::open(char const*, boost::locale::conv::method_type)’：
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0xb0)：undefined reference to ‘ucnv_open_50’未定义的引用
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0xcd)：undefined reference to ‘ucnv_close_50’未定义的引用
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0x146)：undefined reference to ‘UCNV_FROM_U_CALLBACK_STOP_50’
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0x14e)：undefined reference to ‘ucnv_setFromUCallBack_50’
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0x16b)：undefined reference to ‘UCNV_TO_U_CALLBACK_STOP_50’
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0x17b)：undefined reference to ‘ucnv_setToUCallBack_50’
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0x18f)：undefined reference to ‘ucnv_getMaxCharSize_50’
  codepage.cpp:(.text._ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE[_ZN5boost6locale4conv4impl12uconv_to_utfIwE4openEPKcNS1_11method_typeE]+0x1a2)：undefined reference to ‘ucnv_close_50’
                            ....
  </code></pre>
  
  <p>i've no idea what happened, i try to install libiconv.a,but i didn't work.
  so, would anynoe tell me how to solve this problem.</p>