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
some hints:
#include <opencv2/opencv.hpp>
not<cv.h>
cv::VideoCapture
, notCvCapture
.-lopencv_highgui -lopencv_objdetect