Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

undefined reference while using EclipseCDT and opencv

I have some code :

enter code here #include <highgui.h> #include <iostream> #include <stdio.h> #include <cv.h>

    using namespace std;
    using namespace cv;
    using namespace std;

    int main()
    {
        cvNamedWindow("people detecting camera",1);
        CvCapture* capture = cvCaptureFromCAM(CV_CAP_ANY);
        CascadeClassifier peopleDetector;
        peopleDetector.load("src/people.xml");
        if(peopleDetector.empty())


and i get these errors

undefined reference to `cvNamedWindow'
undefined reference to `cvCreateCameraCapture'
undefined reference to `cv::CascadeClassifier::CascadeClassifier()'
undefined reference to `cv::CascadeClassifier::load(std::string const&)'
undefined reference to `cv::CascadeClassifier::empty() const'

Now from what I have all the imclude directories added does this mean the compiler cannot find the openCV library