I am following a tutorial about OpenCV, but when I build my project, a message of error is displayed:
#include <highgui.h>
#include <cv.h>
int main (int argc, char **argv) {
    cvNamedWindow("Example2", CV_WINDOW_AUTOSIZE);
    CvCapture* capture = cvCreateFileCapture("code.avi");
    IplImage *frame;
    while (1) {
        frame = cvQueryFrame(capture);
        if (!frame)
            break;
        cvShowImage("Example2", frame);
        char c = cvWaitKey(33);
        if (c == 27)
            break;
    }
    cvReleaseCapture(&capture);
    cvDestroyWindow("Example2");
    return 0;
}
The error message is this:
...undefined reference to cvCreateFileCapture
...undefined reference to cvQueryFrame
...undefined reference to cvReleaseCapture
I imported all the libraries and include files. And the "Example1" worked just fine.
I am using Ubuntu 14.04 (Trusty Tahr) and Eclipse.
 
     
    