Skip to content

x64 Linked failed #3

@EricksonLu

Description

@EricksonLu

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/
bsdnoobz/web-based-face-detect#1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions