ios - opencv2.framework/opencv2(surf.o) duplicate symbols for architecture armv7 -
i integrating opencv2.framework project. did following steps completion.
- added opencv2.framework "linked frameworks , libraries"
- added libc++.dylib "linked frameworks , libraries"
added following code appname-prefix.pch file
#ifdef __cplusplus
#import "opencv2/opencv.hpp"
#endifchanged compiler default of apple llvm compiler 4.2 - language -> c++ language dialect -> gnu++11 [-std=gnu++11] c++ standard library -> libc++ (llvm c++ standard libray c++ 11 support)
still getting link error saying
"opencv2.framework/opencv2(surf.o) ld: 21 duplicate symbols architecture armv7"
can me on this?
edit:
my xcode version 4.6, ios sdk 6.1 , deployment target 4.3 (i tested 5.0 also, not working in target too)
update: github pull request fixes issue merged opencv.
cause: in opencv source, there 2 files named 1. surf.cpp , 2. surf.ocl.cpp results in 2 surf.o object files each architecture inside opencv framework library.
fix: in opencv source, apply patch github pull request , build opencv ios.
see: use lipo on opencv extract separate libs each architecture ( armv7, armv7s , i386 ) , use ar -tv
see 2 object files of same size name surf.o
i don't know: xcode projects fails pre built opencv framework. use xcode 5.0 opencv 2.4.6.1. can fixed xcode build setting ?
Comments
Post a Comment