Linking OpenCV Now we need to link opencv2.framework with Xcode. Select the project Navigator in the left hand panel and click on project name. Under the TARGETS click on Build Phases. Expand Link Binary With Libraries option. Click on Add others and go to directory where opencv2.framework is located and click open.
Modify *-Prefix.pch Open the file named NameOfProject-Prefix.pch ( replace NameOfProject with name of your project) and add the following lines of code.
Change CLANG_CXX_LIBRARY Change CLANG_CXX_LIBRARY to libstdc++