使用boost安装libtorrent时出错

时间:2014-11-22 19:11:16

标签: boost libtorrent

在Lubuntu 14.04 64位上,当我尝试安装de libtorrent库时,我收到此配置错误:

checking for boostlib >= 1.35... yes
checking whether the Boost::System library is available... yes
checking for exit in -l/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/... no
checking for exit in -lboost_system-/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/... no
configure: error: Could not link against boost_system-/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/ !

我执行了这个:

alberto@alberto-virtual-machine:~/trabajo/libtorrent-rasterbar-0.14.7$ ./configure --with-boost-system=/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi

目录中有这些文件:

alberto@alberto-virtual-machine:~/trabajo/libtorrent-rasterbar-0.14.7$ ls /usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/
error_code.o  libboost_system.so.1.57.0

我对静态库不太了解,有人可以帮我吗?谢谢。

1 个答案:

答案 0 :(得分:1)

参数--with-boost-system采用:

  1. 库名称后缀(如mt,某些发行版使用)
  2. 包含库名称
  3. 的完整路径

    您没有使用库名传递完整路径,因此configure脚本将其解释为(1)并且无法链接到该库。相反,尝试:

    ./configure --with-boost-system=/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/libboost_system.so