Makefile error about library
I'v been trying to compile some codes by make command. In this case I got
error about find "-lboost_program_options". When I'm looking into Makefile
I found some needs in line 29 which I must have those, ok when I have
those where I have to put them? can any one help me?
Error:
g++ src/*.o -o cbir -lboost_program_options -lhdf5 -lboost_filesystem
-lboost_system -llog4cxx -lflann
c:/mingw/bin/../lib/gcc/mingw32/4.3.3/../../../../mingw32/bin/ld.exe:
cannot find -lboost_program_options collect2: ld returned 1 exit status
Makefile:29: recipe for target `cbir' failed
make: *** [cbir] Error 1
Makefile:
# Compiler flags
CC=g++
CFLAGS= -I. -Iflann/src/cpp
# Class name
CLASS=cse484
# Project name
PROJECT=project
# MSU aPID
aPID=riggleza-vanweime
# OBJ Files...
OBJ=$(patsubst %.cpp,%.o,$(wildcard src/*.cpp))
# Output File...
OUTPUT_FILE = cbir
# Source dir
SRC = src
# Include dir
INC = inc
all: $(OBJ) cbir
cbir: $(OBJ)
$(CC) $(SRC)/*.o $(FLAGS) -o $(OUTPUT_FILE) -lboost_program_options
-lhdf5 -lboost_filesystem lboost_system -llog4cxx -lflann
clean:
rm -f $(SRC)/*.o $(OUTPUT_FILE) $(CLASS)-$(PROJ)-$(aPID)*.tar.gz
dist: clean
tar -cvzf $(CLASS)-$(PROJECT)-$(aPID).tar.gz *
dist-final: clean
astyle --style=kr *.cpp *.h
rm -f *.orig
tar -cvzf $(CLASS)-$(PROJ)-$(aPID).final.tar.gz *
%.o: %.cpp
$(CC) $(CFLAGS) -c -o $*.o $*.cpp
No comments:
Post a Comment