首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >libtorrent-rasterbar编译示例

libtorrent-rasterbar编译示例
EN

Stack Overflow用户
提问于 2012-03-26 07:06:23
回答 2查看 2K关注 0票数 2

我想使用libtorrent-rasterbar来开发一些torren测试,但是当我试图编译包中的示例时,我得到了这个错误:

代码语言:javascript
复制
   g++ dump_torrent.cpp 
In file included from /usr/local/include/libtorrent/torrent_info.hpp:61:0,
                 from dump_torrent.cpp:40:
/usr/local/include/libtorrent/file_storage.hpp:110:8: error: ‘void libtorrent::file_storage::add_file(const wpath&, libtorrent::size_type, int, time_t, const boost::filesystem3::path&)’ cannot be overloaded
/usr/local/include/libtorrent/file_storage.hpp:106:8: error: with ‘void libtorrent::file_storage::add_file(const boost::filesystem3::path&, libtorrent::size_type, int, time_t, const boost::filesystem3::path&)’
In file included from dump_torrent.cpp:40:0:
/usr/local/include/libtorrent/torrent_info.hpp:195:3: error: ‘libtorrent::torrent_info::torrent_info(const wpath&)’ cannot be overloaded
/usr/local/include/libtorrent/torrent_info.hpp:193:3: error: with ‘libtorrent::torrent_info::torrent_info(const boost::filesystem3::path&)’
/usr/local/include/libtorrent/torrent_info.hpp:204:3: error: ‘libtorrent::torrent_info::torrent_info(const wpath&, boost::system::error_code&)’ cannot be overloaded
/usr/local/include/libtorrent/torrent_info.hpp:202:3: error: with ‘libtorrent::torrent_info::torrent_info(const boost::filesystem3::path&, boost::system::error_code&)’
In file included from /usr/local/include/libtorrent/magnet_uri.hpp:38:0,
                 from dump_torrent.cpp:42:
/usr/local/include/libtorrent/torrent_handle.hpp:585:8: error: ‘void libtorrent::torrent_handle::move_storage(const wpath&) const’ cannot be overloaded
/usr/local/include/libtorrent/torrent_handle.hpp:581:8: error: with ‘void libtorrent::torrent_handle::move_storage(const boost::filesystem3::path&) const’
/usr/local/include/libtorrent/torrent_handle.hpp:586:8: error: ‘void libtorrent::torrent_handle::rename_file(int, const wpath&) const’ cannot be overloaded
/usr/local/include/libtorrent/torrent_handle.hpp:582:8: error: with ‘void libtorrent::torrent_handle::rename_file(int, const boost::filesystem3::path&) const’

库的版本是: libtorrent-rasterbar-0.15.10 libboost-1.46。另外,我正在尝试在linux下使用它。

如果您需要其他信息,我很乐意提供给您。谢谢

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-03-28 01:10:02

我找到了解决方案。

Libtorrent-rasterbar需要boost-filesystem版本号2,但是当前版本是3,所以要修复这个问题,您必须使用这个标志来编译它:-DBOOST_FILESYSTEM_VERSION=2

票数 3
EN

Stack Overflow用户

发布于 2012-03-26 07:12:59

尝试使用构建脚本。我也体验过libtorrent-rasterbar,我可以用下一条命令做dump_torrent:

创建dump_torrent

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9864871

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档