I am integrating opencv2.framework with my project. I did the following steps for completion.
- Added opencv2.framework to "Linked Frameworks and Libraries"
- Added libc++.dylib to "Linked Frameworks and Libraries"
Added following code to AppName-Prefix.pch file
#ifdef __cplusplus
#import "opencv2/opencv.hpp"
#endif
Changed 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 with C++ 11 support)
Still I am getting a link error which is saying
"opencv2.framework/opencv2(surf.o)
ld: 21 duplicate symbols for architecture armv7"
Can anyone help me on this?
EDIT:
My XCode version is 4.6, IOS SDK is 6.1 and deployment target is 4.3 (I tested with 5.0 also, but not working in that target too)
Copyright Notice:Content Author:「imalvare」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/16482218/opencv2-framework-opencv2surf-o-duplicate-symbols-for-architecture-armv7