内容简介:翻译自:https://stackoverflow.com/questions/14674374/trying-to-link-boost-1-52-thread
我正在尝试编译我的程序但它根本不会链接.我已经指定了boost lib文件的路径,链接器仍然抱怨.这是我得到的链接错误:
1>Edproj.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ) 1>Edproj.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAABVerror_category@12@XZ) 1>Edproj.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall boost::detail::thread_data_base::~thread_data_base(void)" (??1thread_data_base@detail@boost@@UAE@XZ) 1>Edproj.obj : error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z) 1>Edproj.obj : error LNK2001: unresolved external symbol "public: void __thiscall boost::thread::detach(void)" (?detach@thread@boost@@QAEXXZ) 1>Edproj.obj : error LNK2001: unresolved external symbol "public: void __thiscall boost::thread::join(void)" (?join@thread@boost@@QAEXXZ) 1>Edproj.obj : error LNK2001: unresolved external symbol "private: void __thiscall boost::thread::start_thread(void)" (?start_thread@thread@boost@@AAEXXZ) 1>Edproj.obj : error LNK2001: unresolved external symbol "bool __cdecl boost::this_thread::interruptible_wait(void *,struct boost::detail::timeout)" (?interruptible_wait@this_thread@boost@@YA_NPAXUtimeout@detail@2@@Z)
BOOST_LIB_DIAGNOSTIC返回
1> Linking to lib file: libboost_thread-vc100-mt-s-1_52.lib 1> Linking to lib file: libboost_date_time-vc100-mt-s-1_52.lib 1> Linking to lib file: libboost_system-vc100-mt-s-1_52.lib 1> Linking to lib file: libboost_chrono-vc100-mt-s-1_52.lib
更多信息:
我正在运行64位Windows 8 Pro,并使用以下选项编译了boost
bjam --build-type=complete --toolset=msvc10.0 address-model=64 architecture=x86 variant=debug,release threading=multi link=static runtime-link=static
谁能告诉我有什么问题?
更新:
在更改为增强1.51后,它排除了8个链接器错误中的7个,但这个仍然是持久的
error LNK2001: unresolved external symbol "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z)
我不知道这里发生了什么.这个来自boostpro 32位安装程序.它不能与我的源文件有关吗?
更新:
好的,我已经为boost 1.51解决了这个问题.在物业页>>中结果C/C++>>代码生成>>启用C Exceptions对我来说已关闭.
好.我将尝试查看相同的设置是否解决了boost 1.52的问题.稍后会更新.
我之前遇到过同样的问题:我使用默认参数构建boost lib,直接运行bootstrap.bat.
如果你在项目中使用boost :: system,你应该使用并指定x86或x64版本的boost :: system lib.
您可以使用此bat重新编译boost lib,保存这些以提升根文件夹并在CMD窗口中运行它(不要双击!):
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" x86 cd boost_1_60_0 call bootstrap.bat rem Most libraries can be static libs b2 -j8 toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/x64 b2 -j8 toolset=msvc-14.0 address-model=32 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/win32 pause
翻译自:https://stackoverflow.com/questions/14674374/trying-to-link-boost-1-52-thread
以上所述就是小编给大家介绍的《c – 尝试链接Boost 1.52线程》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
数据挖掘导论
Pang-Ning Tan、Michael Steinbach、Vipin Kumar / 范明、范宏建 / 人民邮电出版社 / 2010-12-10 / 69.00元
本书全面介绍了数据挖掘,涵盖了五个主题:数据、分类、关联分析、聚类和异常检测。除异常检测外,每个主题都有两章。前一章涵盖基本概念、代表性算法和评估技术,而后一章讨论高级概念和算法。这样读者在透彻地理解数据挖掘的基础的同时,还能够了解更多重要的高级主题。 本书是明尼苏达大学和密歇根州立大学数据挖掘课程的教材,由于独具特色,正式出版之前就已经被斯坦福大学、得克萨斯大学奥斯汀分校等众多名校采用。 ......一起来看看 《数据挖掘导论》 这本书的介绍吧!