2016-08-11 125 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