Boost - 使用/ MT而不是/ MD编译链接时未解析的外部符号

时间:2014-01-07 12:00:55

标签: multithreading boost visual-studio-2013

我已将发布配置中项目的“运行时库”设置更改为“多线程(/ MT)”(以前是“多线程DLL(/ MD)”)以摆脱依赖于msvc * -libraries。

我使用bjam使用选项'--prefix = boost_build variant = release link = static runtime-link = static threading = multi runtime-debugging = off'构建boost,这似乎生成了正确的库。 ( 'libboost_system-VC120-MT-S-1_55.lib')

但是,尝试与它们链接会导致这些链接器错误:

1>Tags.obj : error LNK2001: unresolved external symbol "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z)
1>libboost_system-vc120-mt-s-1_55.lib(error_code.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z)
1>libboost_thread-vc120-mt-s-1_55.lib(thread.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z)
1>Tags.obj : error LNK2001: unresolved external symbol "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ)
1>libboost_system-vc120-mt-s-1_55.lib(error_code.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ)
1>libboost_thread-vc120-mt-s-1_55.lib(thread.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ)
1>3ds.obj : error LNK2001: unresolved external symbol "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit@std@@QAE@H@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ)
1>3ds.obj : error LNK2001: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_ctor(class std::_Locinfo *,char const *)" (?_Locinfo_ctor@_Locinfo@std@@SAXPAV12@PBD@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "public: static void __cdecl std::_Locinfo::_Locinfo_dtor(class std::_Locinfo *)" (?_Locinfo_dtor@_Locinfo@std@@SAXPAV12@@Z)
1>3ds.obj : error LNK2001: unresolved external symbol __Getctype
1>3ds.obj : error LNK2001: unresolved external symbol __Getcvt
1>3ds.obj : error LNK2001: unresolved external symbol "private: static int std::locale::id::_Id_cnt" (?_Id_cnt@id@locale@std@@0HA)
1>3ds.obj : error LNK2001: unresolved external symbol "private: static class std::locale::_Locimp * __cdecl std::locale::_Init(bool)" (?_Init@locale@std@@CAPAV_Locimp@12@_N@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "private: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@CAPAV_Locimp@12@XZ)
1>3ds.obj : error LNK2001: unresolved external symbol __Tolower
1>3ds.obj : error LNK2001: unresolved external symbol __Toupper
1>3ds.obj : error LNK2001: unresolved external symbol "char const * __cdecl std::_Syserror_map(int)" (?_Syserror_map@std@@YAPBDH@Z)
1>libboost_system-vc120-mt-s-1_55.lib(error_code.obj) : error LNK2001: unresolved external symbol "char const * __cdecl std::_Syserror_map(int)" (?_Syserror_map@std@@YAPBDH@Z)
1>libboost_thread-vc120-mt-s-1_55.lib(thread.obj) : error LNK2001: unresolved external symbol "char const * __cdecl std::_Syserror_map(int)" (?_Syserror_map@std@@YAPBDH@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "char const * __cdecl std::_Winerror_map(int)" (?_Winerror_map@std@@YAPBDH@Z)
1>libboost_system-vc120-mt-s-1_55.lib(error_code.obj) : error LNK2001: unresolved external symbol "char const * __cdecl std::_Winerror_map(int)" (?_Winerror_map@std@@YAPBDH@Z)
1>libboost_thread-vc120-mt-s-1_55.lib(thread.obj) : error LNK2001: unresolved external symbol "char const * __cdecl std::_Winerror_map(int)" (?_Winerror_map@std@@YAPBDH@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "private: static void __cdecl std::ios_base::_Ios_base_dtor(class std::ios_base *)" (?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z)
1>libboost_system-vc120-mt-s-1_55.lib(error_code.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z)
1>libboost_thread-vc120-mt-s-1_55.lib(thread.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > std::cout" (?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A)
1>3ds.obj : error LNK2001: unresolved external symbol "__int64 const std::_BADOFF" (?_BADOFF@std@@3_JB)
1>3ds.obj : error LNK2001: unresolved external symbol "public: static void __cdecl std::ios_base::_Addstd(class std::ios_base *)" (?_Addstd@ios_base@std@@SAXPAV12@@Z)
1>3ds.obj : error LNK2001: unresolved external symbol "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception@std@@YA_NXZ)
1>3ds.obj : error LNK2001: unresolved external symbol "public: static class std::locale::id std::ctype<char>::id" (?id@?$ctype@D@std@@2V0locale@2@A)
1>3ds.obj : error LNK2001: unresolved external symbol "void __cdecl std::_Facet_Register(class std::_Facet_base *)" (?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z)
1>C:\Users\****\Desktop\shared\Visual Studio Projects\weave\Release\shared.dll : fatal error LNK1120: 23 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我在这里看到过类似问题的各种帖子,但总是证明这是由于不同的编译器设置。

在我的情况下,设置是一样的,所以发生了什么?

0 个答案:

没有答案
相关问题