So you have OpenCV installed, but can't quite get anything to compile. Make sure you do the following.

/usr/include is usually stored in your path. So to access the opencv library files, do the following:

#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <opencv/cxcore.h>

Also use a makefile similar to the following:

OCV_LIBS += -lcv -lcvaux -lhighgui -lcxcore

all: main

main:
        g++ sample.cpp -o sample $(OCV_LIBS)

in case the linker does not find the library to link, try with explicit name

OCV_LIBS += -l:libopencv_core.so -l:libopencv_highgui.so 

OpenCVWiki: cantCompile (last edited 2011-02-15 22:45:55 by ArnaudNauwynck)