c++ - unresolved external symbol while linking to boost statically -


i'm trying build application , statically linking boost 1.57 6 linking errors:

>link : warning lnk4044: unrecognized option '/static'; ignored 2>shaderprogram.obj : error lnk2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@yaabverror_category@12@xz) referenced in function "void __cdecl boost::system::`dynamic initializer 'native_ecat''(void)" (??__enative_ecat@system@boost@@yaxxz) 2>shaderprogram.obj : error lnk2019: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@yaabverror_category@12@xz) referenced in function "void __cdecl boost::system::`dynamic initializer 'errno_ecat''(void)" (??__eerrno_ecat@system@boost@@yaxxz) 2>shaderprogram.obj : error lnk2019: unresolved external symbol "void __cdecl boost::filesystem::path_traits::convert(char const *,char const *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > &,class std::codecvt<wchar_t,char,int> const &)" (?convert@path_traits@filesystem@boost@@yaxpbd0aav?$basic_string@_wu?$char_traits@_w@std@@v?$allocator@_w@2@@std@@abv?$codecvt@_wdh@5@@z) referenced in function "public: __thiscall boost::filesystem::path::path<char const [8]>(char const (&)[8],void *)" (??$?0$$by07$$cbd@path@filesystem@boost@@qae@aay07$$cbdpax@z) 2>shaderprogram.obj : error lnk2019: unresolved external symbol "void __cdecl boost::filesystem::path_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class std::codecvt<wchar_t,char,int> const &)" (?convert@path_traits@filesystem@boost@@yaxpb_w0aav?$basic_string@du?$char_traits@d@std@@v?$allocator@d@2@@std@@abv?$codecvt@_wdh@5@@z) referenced in function "void __cdecl boost::filesystem::path_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?convert@path_traits@filesystem@boost@@yaxpb_w0aav?$basic_string@du?$char_traits@d@std@@v?$allocator@d@2@@std@@@z) 2>shaderprogram.obj : error lnk2019: unresolved external symbol "public: class boost::filesystem::path & __thiscall boost::filesystem::path::operator/=(class boost::filesystem::path const &)" (??_0path@filesystem@boost@@qaeaav012@abv012@@z) referenced in function "class boost::filesystem::path __cdecl boost::filesystem::operator/(class boost::filesystem::path const &,class boost::filesystem::path const &)" (??kfilesystem@boost@@ya?avpath@01@abv201@0@z) 2>shaderprogram.obj : error lnk2019: unresolved external symbol "public: static class std::codecvt<wchar_t,char,int> const & __cdecl boost::filesystem::path::codecvt(void)" (?codecvt@path@filesystem@boost@@saabv?$codecvt@_wdh@std@@xz) referenced in function "public: __thiscall boost::filesystem::path::path<char const [8]>(char const (&)[8],void *)" (??$?0$$by07$$cbd@path@filesystem@boost@@qae@aay07$$cbdpax@z) 2>c:\users\structo\desktop\restructo\build-release\src\release\restructo.exe : fatal error lnk1120: 6 unresolved externals 

what did:

  1. i built boost with:

    b2 link=static variant=release runtime-link=static 
  2. in cmake, have

    set(build_shared_libs off) set(cmake_exe_linker_flags ${cmake_exe_linker_flags} "-static") set(boost_use_static_runtime on) set(boost_use_static_libs on) set(boost_use_multithreaded on) find_package(boost required components filesystem system) 
  3. in visual studio 2013 set solution configuration release runtime library multithreaded set path .libs in vc++ directories->library path

any idea how fix this? thank time!


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -