wzyy2 / gstreamer-opencv

opencv + gstreamer simple demo
132 stars 42 forks source link

x64 Linked failed #3

Open EricksonLu opened 6 years ago

EricksonLu commented 6 years ago

When I LD the project failed. My opencv version is 2.4.13.4-16-g7c0193b compiled from git.

./opencv/OpenCVFaceDect.o: In function `OpenCVFaceDect::OpenCVFaceDect()':
OpenCVFaceDect.cpp:(.text+0x41): undefined reference to `cv::CascadeClassifier::CascadeClassifier()'
OpenCVFaceDect.cpp:(.text+0xa7): undefined reference to `cv::ocl::setBinaryPath(char const*)'
OpenCVFaceDect.cpp:(.text+0x11b): undefined reference to `cv::CascadeClassifier::~CascadeClassifier()'
./opencv/OpenCVFaceDect.o: In function `OpenCVFaceDect::~OpenCVFaceDect()':
OpenCVFaceDect.cpp:(.text+0x1bf): undefined reference to `cv::CascadeClassifier::~CascadeClassifier()'
OpenCVFaceDect.cpp:(.text+0x22b): undefined reference to `cv::CascadeClassifier::~CascadeClassifier()'
./opencv/OpenCVFaceDect.o: In function `OpenCVFaceDect::Initialize(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> >)':
OpenCVFaceDect.cpp:(.text+0x28b): undefined reference to `cv::CascadeClassifier::load(std::__cxx11::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)'
./opencv/OpenCVFaceDect.o: In function `OpenCVFaceDect::Run()':
OpenCVFaceDect.cpp:(.text+0x562): undefined reference to `cv::CascadeClassifier::detectMultiScale(cv::Mat const&, std::vector<cv::rect_<int>, std::allocator<cv::rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)'
collect2: error: ld returned 1 exit status

I found a bolg shows a method, but i am poor for write makefile.Could you spend a bit of time fix this? http://blog.csdn.net/andylfg/article/details/39530559 http://answers.opencv.org/question/165673/i-found-this-error-while-running-sample-cpp-example-facedetectcpp-undefiend-reference-to-cv/ https://github.com/bsdnoobz/web-based-face-detect/issues/1

wzyy2 commented 6 years ago

Have you install opencv to system library path?