"Undefined symbols for architecture armv7" when importing STATIC LIBRARY that contains OPENCV functions "Undefined symbols for architecture armv7" when importing STATIC LIBRARY that contains OPENCV functions xcode xcode

"Undefined symbols for architecture armv7" when importing STATIC LIBRARY that contains OPENCV functions


There were two issues related to linking libraries:

  1. Firstly, although my subproject had the opencv2.frameworkcorrectly added and linked to it, I also had to add the frameworkto my main project. This way I got rid of the cv::* linkingproblems;

  2. The second issue was related to my cross-compiling Objective-C++ configuration. Since I was using libc++ as my Standard Library, I had to add -lc++ to my Other Linker Flags. In case you are using libstdc++ as your Standard Library, you should add -lstdc++ instead.

After those changes, it all worked perfectly!Good luck!


I think its because ur project is not linking to the C++ runtime .

Try adding libc++.dylib to ur linked Libraries.