我想从libtorrent official website编译示例(make_torrent)
g++ create_torrent_file.cpp -o run -lboost_filesystem-mt 但是我得到了这个错误:
create_torrent_file.cpp:(.text+0x158): undefined reference to
`libtorrent::file_storage::file_storage()'我已经安装了libtorrent-rasterbar
ldconfig -v | grep libtorrent:
libtorrent-rasterbar.so.6 -> libtorrent-rasterbar.so.6.0.0那么我该如何编译这段源代码呢?
发布于 2011-03-22 19:27:04
你需要在链接器中添加libtorrent-rasterbar。尝试执行以下命令:
g++ create_torrent_file.cpp -o run -ltorrent-rasterbar -lboost_filesystem-mthttps://stackoverflow.com/questions/5390324
复制相似问题