gpt4 book ai didi

c++ - libtorrent-rasterbar 编译示例

转载 作者:行者123 更新时间:2023-11-30 04:28:45 27 4
gpt4 key购买 nike

我想使用 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 需要 boost-filesystem 版本号 2,但当前版本是 3,所以要解决这个问题你必须用这个标志编译它:-DBOOST_FILESYSTEM_VERSION=2

关于c++ - libtorrent-rasterbar 编译示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9864871/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com