Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

adding opencv to my existing makefile

I need to add the opencv for image detection into my existing camera project, I get link error that undefined reference to `cvCreateImage'. Can you pointout what need to be done in my Makefile i just added to my exsisting Makefile ( I cant use cMake)

CFLAGS = 'pkg-config --cflags opencv' -g -O2 CPP = gcc -E CPPFLAGS = CYGPATH_W = echo DATADIRNAME = DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DEPS_CFLAGS = -pthread -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/SDL -I/usr/local/include/opencv -I/usr/local/include/ DEPS_LIBS = 'pkg-config --libs opencv' -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lSDL -lportaudio -lasound -lm -lpthread -lpng12 -lavcodec -lavutil -lv4l2 -ludev -lrt

Can you guys point out what i wrong here in the Makefile.

adding opencv to my existing makefile

I need to add the opencv for image detection into my existing camera project, I get link error that undefined reference to `cvCreateImage'. Can you pointout what need to be done in my Makefile i just added to my exsisting Makefile ( I cant use cMake)

CFLAGS = 'pkg-config --cflags opencv' -g -O2

CPP = gcc -E CPPFLAGS = -E

CYGPATH_W = echo DATADIRNAME = DEFS = -DHAVE_CONFIG_H DEPDIR = .deps

DEPS_CFLAGS = -pthread -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/SDL -I/usr/local/include/opencv -I/usr/local/include/

DEPS_LIBS = 'pkg-config --libs opencv' -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lglib-2.0 -lSDL -lportaudio -lasound -lm -lpthread -lpng12 -lavcodec -lavutil -lv4l2 -ludev -lrt

Can you guys point out what i wrong here in the Makefile.