Reputation: 3781
I am trying to compile this repository: https://github.com/graehl/carmel.
There is a standard makefile for compiling.
Although I have installed the boost library "libboost-all-dev", I encounter such an error:
/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
How can I fix the problem?
Thanks,
Upvotes: 0
Views: 535
Reputation: 681
So I think that the problem is that you not tell to your linker where is the boots libraries. I suppose that then I readed this question Question So using this command you can know where the libraries are.
dpkg -S <name of library>
for example:
dpkg -S boost_random
for the -lboost_random-mt
Upvotes: 1
Reputation: 681
Try to use this command to searc if in your system there are the needed packages. So if'll have it you could try to compile the project keeping attention how your boots libraries are installed. In README.md is written:
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.
Upvotes: 1