Question

Here is the make command with associated error:

g++ -g -O2 -Wl,-rpath=../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib -pthread -o xml_wrapper_tester xml_wrapper_tester-runner.o  -L../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib -lboost-system ../xml_wrapper/.libs/libxml_wrapper.a -pthread
/usr/bin/ld: cannot find -lboost-system

Going into the directory where the make file is and ls -l the path specified to -L shows the library exists.

[mehoggan@localhost xml_wrapper_tester]$ ls -l ../../../external/boost-1.55.0-x86_64-linux-gcc-4.8.2/lib | grep system
-rw-rw-r--. 1 mehoggan mehoggan  217676 May  5 22:37 libboost_filesystem.a
lrwxrwxrwx. 1 mehoggan mehoggan      29 May  5 22:37 libboost_filesystem.so -> libboost_filesystem.so.1.55.0
-rwxrwxr-x. 1 mehoggan mehoggan  116955 May  5 22:37 libboost_filesystem.so.1.55.0
-rw-rw-r--. 1 mehoggan mehoggan   49154 May  5 22:37 libboost_system.a
lrwxrwxrwx. 1 mehoggan mehoggan      25 May  5 22:37 libboost_system.so -> libboost_system.so.1.55.0
-rwxrwxr-x. 1 mehoggan mehoggan   20401 May  5 22:37 libboost_system.so.1.55.0

Why is it that boost_system cannot be found by g++?

Was it helpful?

Solution

The error seems to be with the -lboost-system argument you specified, which is indeed not in the folder you listed.

Try using -lboost_system instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top