Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/133.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ libtorrent rasterbar编译示例_C++_Boost - Fatal编程技术网

C++ libtorrent rasterbar编译示例

C++ libtorrent rasterbar编译示例,c++,boost,C++,Boost,我想使用libtorrent rasterbar开发torren的一些测试,但是当我试图编译包中的示例时,我遇到了以下错误: 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.h

我想使用libtorrent rasterbar开发torren的一些测试,但是当我试图编译包中的示例时,我遇到了以下错误:

   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下使用它

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

尝试使用构建脚本。 我还使用libtorrent rasterbar进行了体验,我可以通过下一个命令生成dump_torrent:


我找到了解决办法

Libtorrent rasterbar需要boost文件系统版本号2,但当前版本为3,因此要解决此问题,您必须使用以下标志编译它: -DBOOST\u FILESYSTEM\u VERSION=2