I am currently a real beginner in Objective C, and I am developing an app using the framework OpenCV.
I am following a tutorial, but while builing the project, I got
This actually seems to hide the actual problem: the fact that your LLVM compiler may not choose a proper standard C++ library for compiling by default. You should go to
Project (or your Target) -> Build Settings -> Apple LLVM 6.0 - Language - C++ -> C++ Standard Library
and make sure that you pick libc++
as your choice, not just Compiler Default
, since modern OpenCV library is linked against libc++. This will solve your problem without having to add the extra libc++.dylib. Including libc++.dylib framework as a workaround will not always work out if your Compiler Default
actually does not choose libc++ library!
To check what "Compiler Default" is, you can do something like this. Mine somehow chooses c++98 as a default.