Hi,
I am trying to compile my program, using this makefile :
CXXFLAGS += pkg-config opencv --cflags
LDFLAGS += pkg-config opencv --libs
TARGET = test
$(TARGET): $(OBJS) $(CXX) -o $(TARGET) $(LDFLAGS) $(OBJS)
%.o: %.cpp $(CXX) -o $@ -c $< $(CXXFLAGS) $(LIBS)
all: $(TARGET)
test.cpp :
include <cv.h>
include <highgui.h>
int main(void) { cv::Mat image;
}
It trigger the following error message :
g++ -o test.o -c test.cpp -O2 -g -Wall -fmessage-length=0 pkg-config opencv --cflags
g++ -o test pkg-config opencv --libs
test.o
test.o: In function cv::Mat::release()':
/usr/include/opencv2/core/mat.hpp:382: undefined reference to
cv::Mat::deallocate()'
test.o: In function ~Mat':
/usr/include/opencv2/core/mat.hpp:297: undefined reference to
cv::fastFree(void*)'
collect2: ld returned 1 exit status
make: * [test] Error 1
Can you help me solve this problem please ?