¿Cómo compilar un código LBTorrent (RasterBar)?
-
28-10-2019 - |
Pregunta
Quiero compilar ejemplo (make_torrent) de sitio web oficial de Libtorrent:
g++ create_torrent_file.cpp -o run -lboost_filesystem-mt
Pero recibo este error:
create_torrent_file.cpp:(.text+0x158): undefined reference to
`libtorrent::file_storage::file_storage()'
Tengo Libtorrent-RasterBar instalado
ldconfig -v | grep libtorrent:
libtorrent-rasterbar.so.6 -> libtorrent-rasterbar.so.6.0.0
Entonces, ¿cómo debo compilar este código fuente?
Solución
Debe agregar LBTorrent-RasterBar al enlazador. Prueba el siguiente comando:
g++ create_torrent_file.cpp -o run -ltorrent-rasterbar -lboost_filesystem-mt
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow