Ask Your Question

Revision history [back]

cv.h not found need help with makefile

I want to thank everyone for the help they have given me so far.

I am a Windows person and haven't used a makefile in over 20 years so I really don't know what I'm doing.

I have developed my program in Visual Studio 2012 and it works fine but I must move it to a UNIX server for the class I'm taking. I used the sample makefile from class but when I ran it, I got the message cv.h not found.

After looking over my project in Visual Studio, I determined that I needed to include the following libraries: opencv_core249d.lib opencv_imgproc249d.lib opencv_highgui249d.lib opencv_ml249d.lib opencv_video249d.lib opencv_features2d249d.lib opencv_calib3d249d.lib

without the 249d. I found these libraries in the given directory on the UNIX server as .SO files.

I am having trouble with the LIBS statement:

CC = g++ CFLAGS = -g TARGET = objects OBJS = objects.o LIBPATH = /usr/lib64 LIBS = $(LIBPATH)/libopencv_core.so $(LIBPATH)/libopencv_highgui.so $(LIBPATH)/libopencv_imgproc.so $(LIBPATH)/libopencv_ml.so $(LIBPATH)/libopencv_video.so $(LIBPATH)/libopencv_features2d.so $(LIBPATH)/libopencv_calib3d.so

$(TARGET): $(OBJS) $(CC) -o $@ $(OBJS) $(LIBS)

.SUFFIXES: .cpp .o

.c.o: $(CC) -c $(CFLAGS) $<

.PHONY: clean

clean: /bin/rm -f core *.o $(TARGET)

When I ran make, the message was: * missing separator. Stop.

Could someone point me to a good tutorial on makefiles for OpenCV, or tell me what I'm doing wrong with this makefile, or perhaps both?

Thank you.