linking problems in yosemite
Hi guys,
I am using OpenCV from repository compiled with contrib modules in Yosemite (mac os x 10.10.1). I had some problems compiling the library, specially about CUDA support, but it works now. However my problem is on linking OpenCV to some projects.
If I create a project that uses OpenCV I normally get the usual problem of "Undefined symbols for architecture x86_64". I read about linking problems when you try to combine different libraries compiled with gcc and clang, with CXX flags -stdlib=libstdc++ or -stdlib=libc++. However, I already try several things and I get the same linking problems.
I really want to know or that anyone can clarify me how to deal with this issue to be able to use OpenCV in my machine. This problem is also common in some other libraries.
I will appreciate your help. Thanks.
EDIT:
For instance when I compile an application that uses OpenCV, I get the following linkage problem:
Undefined symbols for architecture x86_64:
"cv::VideoCapture::VideoCapture(int)", referenced from: video_framework::VideoCaptureUnit::OpenStreams(std::__1::vector<std::__1::shared_ptr<video_framework::datastream>, std::__1::allocator<std::__1::shared_ptr<video_framework::datastream>) in libvideo_framework.a(video_capture_unit.cpp.o) "cv::_InputArray::getMatVector(std::__1::vector<cv::mat, std::__1::allocator<cv::mat=""> >&) const", referenced from: vtable for cv::_InputOutputArray in libsegmentation.a(segmentation_unit.cpp.o) vtable for cv::_InputOutputArray in libvideo_framework.a(flow_reader.cpp.o) vtable for cv::_InputOutputArray in libvideo_framework.a(video_pipeline.cpp.o) vtable for cv::_InputOutputArray in libsegment_util.a(segmentation_util.cpp.o) "cv::_InputArray::getUMatVector(std::__1::vector<cv::umat, std::__1::allocator<cv::umat=""> >&) const", referenced from: vtable for cv::_InputOutputArray in libsegmentation.a(segmentation_unit.cpp.o) vtable for cv::_InputOutputArray in libvideo_framework.a(flow_reader.cpp.o) vtable for cv::_InputOutputArray in libvideo_framework.a(video_pipeline.cpp.o) vtable for cv::_InputOutputArray in libsegment_util.a(segmentation_util.cpp.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [seg_tree_sample] Error 1 make[1]: [CMakeFiles/seg_tree_sample.dir/all] Error 2 make: ** [all] Error 2
========================================