Did anyone manage to link an Unity plugin for iOS including OpenCV 2.4.3 (from http://opencv.org/downloads.html) with xCode 4.5.2?
I managed to use the opencv2.framework in a project outside Unity. But when included inside the Unity-iPhone.xcodeproj it does not link anymore with an error Like this:
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::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
cv::Exception::Exception(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int) in opencv2(system.o)
cv::Exception::Exception(cv::Exception const&) in opencv2(system.o)
...
Then If I set the target > build settings > Apple LLVM compiler 4.1 - Language > C++ Standard Library to libc++ (LLVM C++ standard library with C++11 support)
then OpenCV links just fine. But then Unity’s libiPhone-lib.a is not linking properly anymore:
Undefined symbols for architecture armv7:
"std::string::push_back(char)", referenced from:
GetParameter(UTF16String&, int&, bool) in libiPhone-lib.a(TextFormatting.o)
"std::string::assign(char const*, unsigned long)", referenced from:
Append(char const*, char const*) in libiPhone-lib.a(Word.o)
DebugTextLineByLine(char const*) in libiPhone-lib.a(LogAssert.o)
...
I was wondering if anyone managed to get the 2 at the same time. Thanks!