在iOS上升级到Opencv 2.4.5后编译器错误.有这些问题的快速解决方
发布时间:2020-12-14 19:15:19 所属栏目:百科 来源:网络整理
导读:在现有iOS项目上升级openCV版本后,我遇到以下问题. 我试过玩编译器版本和其他一些设置,但我还没有找到解决方案. 谢谢. Ld /Users/_____/Library/Developer/Xcode/DerivedData/_____-czzcfkvvtejzzacaookbbwcmfsdh/Build/Products/Debug-iphoneos/_____.app/_
在现有iOS项目上升级openCV版本后,我遇到以下问题.
我试过玩编译器版本和其他一些设置,但我还没有找到解决方案. 谢谢. Ld /Users/_____/Library/Developer/Xcode/DerivedData/_____-czzcfkvvtejzzacaookbbwcmfsdh/Build/Products/Debug-iphoneos/_____.app/_____ normal armv7 cd /Users/________/Desktop/________NewOpenCV setenv IPHONEOS_DEPLOYMENT_TARGET 5.0 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/_____/Library/Developer/Xcode/DerivedData/________-czzcfkvvtejzzacaookbbwcmfsdh/Build/Products/Debug-iphoneos -L/Users/________/Desktop/________NewOpenCV/../../Downloads/opencv2.framework/Versions/A -F/Users/________/Library/Developer/Xcode/DerivedData/________-czzcfkvvtejzzacaookbbwcmfsdh/Build/Products/Debug-iphoneos -F/Users/________/Desktop/________NewOpenCV -F/Users/________/Desktop/________NewOpenCV/../../Downloads/aptogo-OpenCVForiPhone-cb262eb -F/Users/________/Desktop/________NewOpenCV/../../Downloads -filelist /Users/________/Library/Developer/Xcode/DerivedData/________-czzcfkvvtejzzacaookbbwcmfsdh/Build/Intermediates/________.build/Debug-iphoneos/________.build/Objects-normal/armv7/________.LinkFileList -dead_strip -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=5.0 /Users/________/Desktop/________NewOpenCV/../../Downloads/opencv2.framework/Versions/A/opencv2 -framework CoreMotion -framework AudioToolbox -framework CoreLocation -lz.1.2.5 -framework ExternalAccessory -framework CFNetwork -framework SystemConfiguration -framework MobileCoreServices -framework AVFoundation -framework UIKit -framework Foundation -framework CoreGraphics -o /Users/________/Library/Developer/Xcode/DerivedData/________-czzcfkvvtejzzacaookbbwcmfsdh/Build/Products/Debug-iphoneos/________.app/________ Undefined symbols for architecture armv7: "std::__1::basic_string<char,std::__1::char_traits<char>,std::__1::allocator<char> >::basic_string(std::__1::basic_string<char,std::__1::allocator<char> > const&)",referenced from: cv::Exception::Exception(int,std::__1::basic_string<char,std::__1::allocator<char> > const&,int) in opencv2(system.o) cv::error(cv::Exception const&) in opencv2(system.o) _cvRegisterModule in opencv2(system.o) "std::__1::basic_string<char,std::__1::allocator<char> >::operator=(std::__1::basic_string<char,referenced from: cv::Exception::formatMessage() in opencv2(system.o) "std::__1::basic_string<char,std::__1::allocator<char> >::__init(char const*,unsigned long)",referenced from: cv::medianBlur(cv::_InputArray const&,cv::_OutputArray const&,int) in opencv2(smooth.o) cv::Mat::create(int,int const*,int) in opencv2(matrix.o) cv::setSize(cv::Mat&,int,unsigned long const*,bool) in opencv2(matrix.o) cv::Mat::Mat(cv::Mat const&,cv::Range const&,cv::Range const&) in opencv2(matrix.o) cv::Mat::Mat(cv::Mat const&,cv::Range const*) in opencv2(matrix.o) cv::Mat::diag(int) const in opencv2(matrix.o) cv::Mat::Mat(_IplImage const*,bool) in opencv2(matrix.o) ... "std::__1::basic_string<char,std::__1::allocator<char> >::~basic_string()",bool) in opencv2(matrix.o) ... "std::__1::__vector_base_common<true>::__throw_length_error() const",int) in opencv2(smooth.o) std::__1::vector<int,std::__1::allocator<int> >::__append(unsigned long) in opencv2(smooth.o) std::__1::vector<cv::Vec<int,128>,std::__1::allocator<cv::Vec<int,128> > >::__append(unsigned long) in opencv2(matrix.o) std::__1::vector<cv::Vec<int,64>,64> > >::__append(unsigned long) in opencv2(matrix.o) std::__1::vector<cv::Vec<int,32>,32> > >::__append(unsigned long) in opencv2(matrix.o) std::__1::vector<cv::Vec<int,16>,16> > >::__append(unsigned long) in opencv2(matrix.o) std::__1::vector<cv::Vec<int,12>,12> > >::__append(unsigned long) in opencv2(matrix.o) ... "cv::split(cv::Mat const&,std::vector<cv::Mat,std::allocator<cv::Mat> >&)",referenced from: GetRegionContoursLDC(cv::Mat&,double,std::vector<std::vector<cv::Point_<int>,std::allocator<cv::Point_<int> > >,std::allocator<std::vector<cv::Point_<int>,std::allocator<cv::Point_<int> > > > >&) in GetRegionContoursLDC.o "cv::putText(cv::Mat&,std::string const&,cv::Point_<int>,cv::Scalar_<double>,bool)",referenced from: -[NotesUploaderViewController addMotionDetails:] in NotesUploaderViewController.o -[NotesUploaderViewController addArea:atPoint:onto:] in NotesUploaderViewController.o -[NotesUploaderViewController addMeasureLine:toPoint:usingScale:onto:] in NotesUploaderViewController.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) 解决方法
我不小心包含了OpenCV Unix可执行文件而不是框架(在链接的框架和库部分中).我还必须包含
this answer中提到的libc .dylib文件.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |