1

在 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

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

4

1 回答 1

1

The argument --with-boost-system takes either:

  1. A library name suffix (like mt, which some distros use)
  2. A full path including the library name

You did not pass in a full path with the library name, so the configure script interprets it as (1) and it fails to link against that library. Instead, try:

./configure --with-boost-system=/usr/local/boost_1_57_0/bin.v2/libs/system/build/gcc-4.8/release/threading-multi/libboost_system.so
于 2014-11-23T06:03:30.273 回答