OpenCV 2.4.10 compilation problem with CUDA 6.5 On MAC OS Yosemite (compiler: AppleClang6.0.0.6000056)

asked 2015-02-08 21:24:14 -0500

luckydragon gravatar image

Hello my friends,

When comipling the OpenCV scource code, I got the following error in linking libopencv_gpu.dylib. I'm a newbie to Mac OSX. I would really appreciate it if you could help me.

Thanks, LK

Linking CXX shared library ../../lib/libopencv_gpu.dylib Undefined symbols for architecture x86_64: "loadFromXML(std::string const&, HaarClassifierCascadeDescriptor&, std::vector<haarstage64, std::allocator<haarstage64=""> >&, std::vector<haarclassifiernode128, std::allocator<haarclassifiernode128=""> >&, std::vector<haarfeature64, std::allocator<haarfeature64=""> >&)", referenced from: ncvHaarGetClassifierSize(std::string const&, unsigned int&, unsigned int&, unsigned int&) in cuda_compile_generated_NCVHaarObjectDetection.cu.o ncvHaarLoadFromFile_host(std::string const&, HaarClassifierCascadeDescriptor&, NCVVector<haarstage64>&, NCVVector<haarclassifiernode128>&, NCVVector<haarfeature64>&) in cuda_compile_generated_NCVHaarObjectDetection.cu.o "ncvDebugOutput(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&)", referenced from: loadFromXML(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&, HaarClassifierCascadeDescriptor&, std::__1::vector<haarstage64, std::__1::allocator<haarstage64=""> >&, std::__1::vector<haarclassifiernode128, std::__1::allocator<haarclassifiernode128=""> >&, std::__1::vector<haarfeature64, std::__1::allocator<haarfeature64=""> >&) in cascadeclassifier.cpp.o HaarFeature64::setRect(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) in cascadeclassifier.cpp.o cv::gpu::CascadeClassifier_GPU::HaarCascade::load(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&) in cascadeclassifier.cpp.o NCVVector<haarstage64>::copySolid(NCVVector<haarstage64>&, CUstream_st, unsigned long) const in cascadeclassifier.cpp.o NCVVector<haarclassifiernode128>::copySolid(NCVVector<haarclassifiernode128>&, CUstream_st, unsigned long) const in cascadeclassifier.cpp.o NCVVector<haarfeature64>::copySolid(NCVVector<haarfeature64>&, CUstream_st, unsigned long) const in cascadeclassifier.cpp.o NCVVectorAlloc<haarfeature64>::NCVVectorAlloc(INCVMemAllocator&, unsigned int) in cascadeclassifier.cpp.o ... "groupRectangles(std::vector<ncvrect32u, std::allocator<ncvrect32u=""> >&, int, double, std::vector<unsigned int,="" std::allocator<unsigned="" int=""> >)", referenced from: ncvGroupRectangles_host(NCVVector<ncvrect32u>&, unsigned int&, unsigned int, float, NCVVector<unsigned int="">) in cuda_compile_generated_NCV.cu.o "ncvHaarGetClassifierSize(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&, unsigned int&, unsigned int&, unsigned int&)", referenced from: cv::gpu::CascadeClassifier_GPU::HaarCascade::load(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&) in cascadeclassifier.cpp.o "ncvHaarLoadFromFile_host(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&, HaarClassifierCascadeDescriptor&, NCVVector<haarstage64>&, NCVVector<haarclassifiernode128>&, NCVVector<haarfeature64>&)", referenced from: cv::gpu::CascadeClassifier_GPU::HaarCascade::load(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&) in cascadeclassifier.cpp.o "ncvSetDebugOutputHandler(void ()(std::__1::basic_string<char, std::__1::char_traits<char="">, std::__1::allocator<char> > const&))", referenced from: cv::gpu::CascadeClassifier_GPU::HaarCascade::HaarCascade() in cascadeclassifier.cpp.o cv::gpu::BroxOpticalFlow::operator()(cv::gpu::GpuMat const&, cv::gpu::GpuMat const&, cv::gpu::GpuMat&, cv::gpu::GpuMat&, cv::gpu::Stream&) in optical_flow.cpp.o "std::string::find_last_of(char const, unsigned long, unsigned long) const", referenced from: ncvHaarGetClassifierSize(std::string const&, unsigned int&, unsigned int&, unsigned int&) in cuda_compile_generated_NCVHaarObjectDetection.cu.o ncvHaarLoadFromFile_host(std::string const&, HaarClassifierCascadeDescriptor&, NCVVector<haarstage64>&, NCVVector<haarclassifiernode128>&, NCVVector<haarfeature64>&) in cuda_compile_generated_NCVHaarObjectDetection.cu.o "std::string::compare(char const) const", referenced from: ncvHaarGetClassifierSize(std::string const&, unsigned int&, unsigned int&, unsigned int&) in cuda_compile_generated_NCVHaarObjectDetection.cu.o ncvHaarLoadFromFile_host(std::string const&, HaarClassifierCascadeDescriptor&, NCVVector<haarstage64>&, NCVVector<haarclassifiernode128>&, NCVVector<haarfeature64>&) in ... (more)

edit retag flag offensive close merge delete

Comments

I have the same problem, but I'm compiling opencv-2.4.13 on OS X 10.11.5 (15F34) with Cuda 6.5.12 and NVIDIA GeForce 320M.

francisv gravatar imagefrancisv ( 2016-06-26 05:04:22 -0500 )edit