So I installed boost library as follows
cd /usr/local/
sudo tar --bzip2 -xf ~/Downloads/boost_1_52_0.tar.bz2
sudo ./bootsrap.sh
sudo ./b2 install
Now, I want to compile a code that uses boost library, and the makefile has these two lines to idenity the location of boost: (INC=.. and BOOSTLIB=..)
OBJS = utility.o PtDebug.o
CC = g++
INC = /usr/local/boost_1_52_0/
BOOSTLIB = /usr/local/include/boost/
CFLAGS = -Werror -g
all: my_program
and an example line of linking to boos in the makefile is
$(CC) $(FLAGS) $(OBJS) ipMT.o -o ipmt -L$(BOOSTLIB) -lboost_date_time -lboost_thread
But when I try to make, it fails with this error:
g++ -Werror -g utility.o PtDebug.o ratioWeightedCombIP.o -o rwcip -L/usr/local/include/boost/ -lboost_date_time -lboost_thread
/usr/bin/ld: utility.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
//usr/local/lib/libboost_system.so.1.57.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [misp] Error 1