Ask Your Question

Revision history [back]

I'm writing 2 program with Qt - OpenCV 3. One of 2 uses the "cv::CascadeClassifier::detectMultiScale" function. At compile time I obtain the error:

Undefined symbols for architecture x86_64: "cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::vector<cv::rect_<int>, std::allocator<cv::rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)", referenced from: QThMatchPeople::run() in qthmatchpeople.o QThProcessImage::DetectObjects(cv::Mat, cv::CascadeClassifier&, cv::CascadeClassifier&, QString) in qthprocessimage.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

The other program that does not use this function works well.

I have built OpenCv with cmake -DWITH_1394=OFF -DWITH_FFMPEG=OFF -DOPENCV_EXTRA_MODULES_PATH=modules/opencv_contrib-master/modules .

sudo make -j 4

I'm writing 2 program programs with Qt - OpenCV 3. One of 2 uses the "cv::CascadeClassifier::detectMultiScale" function. At compile time I obtain the error:

Undefined symbols for architecture x86_64: "cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::vector<cv::rect_<int>, std::allocator<cv::rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)", referenced from: QThMatchPeople::run() in qthmatchpeople.o QThProcessImage::DetectObjects(cv::Mat, cv::CascadeClassifier&, cv::CascadeClassifier&, QString) in qthprocessimage.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

The other program that does not use this function works well.

I have built OpenCv with cmake -DWITH_1394=OFF -DWITH_FFMPEG=OFF -DOPENCV_EXTRA_MODULES_PATH=modules/opencv_contrib-master/modules .

. sudo make -j 4

I'm writing 2 programs with Qt - OpenCV 3. One of 2 uses the "cv::CascadeClassifier::detectMultiScale" function. At compile time I obtain the error:Solved by using QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10

Undefined symbols for architecture x86_64: "cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::vector<cv::rect_<int>, std::allocator<cv::rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)", referenced from: QThMatchPeople::run() in qthmatchpeople.o QThProcessImage::DetectObjects(cv::Mat, cv::CascadeClassifier&, cv::CascadeClassifier&, QString) in qthprocessimage.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

The other program that does not use this function works well.

I have built OpenCv with cmake -DWITH_1394=OFF -DWITH_FFMPEG=OFF -DOPENCV_EXTRA_MODULES_PATH=modules/opencv_contrib-master/modules . sudo make -j 4