2016-08-11 124 views
0

我正在尝试编译这个库:https://github.com/graehl/carmel编译文件时无法在ubuntu上找到一些boost库

有一个用于编译的标准makefile。

虽然我已经安装了Boost库 “libboost-ALL-dev的”,我遇到这样的错误:

/usr/bin/ld: cannot find -lboost_random-mt 
/usr/bin/ld: cannot find -lboost_timer-mt 
/usr/bin/ld: cannot find -lboost_chrono-mt 
/usr/bin/ld: cannot find -lboost_system-mt 
collect2: error: ld returned 1 exit status 
../graehl/graehl.mk:331: recipe for target 'bin/linux/carmel' failed 
make: *** [bin/linux/carmel] Error 1 

我该如何解决这一问题?

感谢,

回答

1

尝试,如果在你的系统中有所需的软件包使用此命令变奏。所以如果有它,你可以尝试编译这个项目,注意你的靴子库是如何安装的。在README.md中写道:

cd carmel; make -j 4 install BOOST_SUFFIX=-mt INSTALL_PREFIX=/usr/local 
# BOOST_SUFFIX= depends on how your boost libraries are installed - ls /usr/lib/libboost*.so 
(prerequisites: GNU Make (3.8) C++ compiler (GCC 5, clang 3.7, or visual studio 2015 will do) and Boost, which you probably already have on your linux system; for Mac, you can get them from Homebrew. For windows: MSVC2015 should work; you can also use cygwin or mingw. 
+0

谢谢卡利诺。但是我拥有所有的先决条件。 – yusuf

+1

您能告诉我“dpkg -L libboost-all-dev”的输出 –

+0

http://pastebin.com/e0mZcc3E – yusuf

1

所以我认为问题是你不告诉你的链接器靴子库在哪里。 我想,那么我回答这个问题Question 所以使用这个命令你可以知道库的位置。

dpkg -S <name of library> 

例如:

dpkg -S boost_random 

为-lboost_random-MT

+0

对不起,我在这个操作系统问题上有点不太好。我怎样才能完全解决问题? – yusuf

+1

在make文件中有一些变量,它包含了启动库路径。您必须使用dpkg -S命令来发现库的路径并设置这些变量。例如 –

+0

?对不起,我在这个问题上完全是虚构的。 – yusuf