0
我有一個較舊的系統(OSX 10.6.8與xcode 4.0),我試圖讓OpenCV 2.3.0在它上面工作。我無法解決的問題是,每當我嘗試使用flann庫時,我的xcode都會給我一個Mach-O鏈接器錯誤。到目前爲止,我已經嘗試重新編譯所有庫並從不同的來源構建dylib,但它沒有幫助。當我檢查在終端庫,我得到Opencv 2.3.0 Flann鏈接錯誤(Xcode)
Freddi-2:OpenCV-2.3.0 fredchen$ file /usr/local/lib/libopencv_flann.dylib
/usr/local/lib/libopencv_flann.dylib: Mach-O 64-bit dynamically linked shared library x86_64
我的具體錯誤代碼是:
Undefined symbols for architecture x86_64:
"cv::flann::KDTreeIndexParams::KDTreeIndexParams(int)", referenced from:
_main in main.o
"cv::flann::SearchParams::SearchParams(int, float, bool)", referenced from:
_main in main.o
"cv::FlannBasedMatcher::FlannBasedMatcher(cv::Ptr<cv::flann::IndexParams> const&, cv::Ptr<cv::flann::SearchParams> const&)", referenced from:
_main in main.o
"cv::BFMatcher::BFMatcher(int, bool)", referenced from:
_main in main.o
"cv::flann::IndexParams::~IndexParams()", referenced from:
cv::flann::SearchParams::~SearchParams() in main.o
"cv::flann::IndexParams::~IndexParams()", referenced from:
cv::Ptr<cv::flann::IndexParams>::delete_obj() in main.o
"vtable for cv::BFMatcher", referenced from:
cv::BFMatcher::~BFMatcher() in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已經與項目掛鉤的動態庫是:
libopencv_video.2.3.0.dylib
libopencv_objdetect.2.3.0.dylib
libopencv_ml.2.3.0.dylib
libopencv_legacy.2.3.0.dylib
libopencv_gpu.2.3.0.dylib
libopencv_contrib.2.3.0.dylib
libopencv_ts.2.3.0.dylib
libopencv_imgproc.2.3.0.dylib
libopencv_highgui.2.3.0.dylib
libopencv_flann.2.3.0.dylib
libopencv_features2d.2.3.0.dylib
libopencv_core.2.3.0.dylib
libopencv_calib3d.2.3.0.dylib
我d感謝任何幫助。謝謝!