4 c++ boost visual-c++ libtorrent libtorrent-rasterbar
我正在尝试使用带有VS2013(C++)的libtorrent-rasterbar构建一个简单的代码(examples/simple_client.cpp),但是我收到以下链接器错误:
error LNK2019: unresolved external symbol "void __cdecl libtorrent::rel_performancetimer_pools_nolog_resolvecountries_deprecated_nodht_ext_(void)" (?rel_performancetimer_pools_nolog_resolvecountries_deprecated_nodht_ext_@libtorrent@@YAXXZ) referenced in function "public: __thiscall libtorrent::session::session(struct libtorrent::fingerprint const &,int,unsigned int)" (??0session@libtorrent@@QAE@ABUfingerprint@1@HI@Z)
Run Code Online (Sandbox Code Playgroud)
我使用以下命令编译libtorrent:bjam toolset=msvc-12.0 link=static variant=debug boost=source并链接VS中的所有内容:
附加信息:libtorrent-rasterbar-0.16.15; boost_1_55_0; Windows 8.1 64位.
关于这里出了什么问题的任何想法?
谢谢.
小智 7
经过一些研究和测试,我设法建立了这个项目.这就是我做的:
使用bjam toolset=msvc-12.0 geoip=off
resolve-countries=off link=static variant=debug boost=source这种方式编译geoip和resolve-countries被禁用.
使用@Hernán检查libtorrent RSP文件的提示,我得到了以下预处理器定义:
我在VS中添加了这些定义.对于调试配置,还需要一个定义:TORRENT_DEBUG(重要).
我用的一些网站:
感谢您的帮助.