Friday, March 2, 2012

How to install OpenCV on Mac OS X Lion to work with XCode

I have listed some easy and straight-forward steps below to get OpenCV library working with XCode on Mac OS X Lion without installing unnecessary bulky software on your Mac.

1. Installing CMake

i. CMake is essential to build OpenCV on UNIX. Get CMake Mac OS X binary (dmg) from http://www.cmake.org/cmake/resources/software.html. This comes with a GUI installer, making the installation process easy.

ii. At the end of the CMake installation it will ask whether or not to put CMake into /usr/bin and into PATH environment variable, select Yes and finish the installation. 

iii. Open the Terminal (Launch Pad -> Utilities -> Terminal) and make sure that CMake is successfully installed by entering the following command. It should output the CMake version you have installed.
cmake -version


2. Installing OpenCV

i. Download the latest version of OpenCV for UNIX. At the time of writing this is version 2.3.1 and can be downloaded from http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.3.1/ 

ii. Open the Terminal and change directory to the place where you downloaded the OpenCV distribution tarball. e.g. cd ~/Downloads

iii. Execute the following commands one by one. Each command should complete without errors.

tar xvf OpenCV-2.3.1a.tar.bz2 
cd OpenCV-2.3.1 
mkdir build 
cd build 
cmake -G "Unix Makefiles" .. 
make 
sudo make install 

iv. Above commands will build OpenCV into your /usr/local/ directory. 


3. Testing a Sample Program with XCode

i.) Create a new Command Line Tool with a name of your choice. Set the type as C++ (See the screenshot below).


 ii.) After the new project is opened in XCode, click on the project name. Click Build Settings > All.

iii.) Search for 'Header Search Paths', set the value of Header Search Paths to /usr/local/include

 

iv.) Right click on the project name and select Add File To....

 

v.) A new file selector window will open. Press '/' key to open Go to folder box. Type /usr/local/lib there and hit Return.

vi.) Select the following files from /usr/local/lib and add them to your project. 

libopencv_core.2.3.1.dylib
libopencv_highgui.2.3.1.dylib

v.) Open main.cpp and put the following code there. This code simply reads an image and displays it in a new window. Make sure you put the actual path of your image in the code.

#include <iostream>
#include <opencv2/opencv.hpp>

using namespace std;
using namespace cv;

int main (int argc, const char * argv[])
{
    Mat img = imread("/Users/sadeep/Desktop/image.jpg"); //Change the image path here.
    if (img.data == 0) {
        cerr << "Image not found!" << endl;
        return -1;
    }
    namedWindow("image", CV_WINDOW_AUTOSIZE);
    imshow("image", img);
    waitKey();
}

vi.) Click Product -> Build. This should show the "Build Successful" message.

vii.) Click Product -> Run. Your image will open in a new window which will close upon a key press.

Happy coding with OpenCV!

57 comments:

  1. when I try to execute the 'make' command, these two errors are generated


    make[2]: *** [modules/flann/CMakeFiles/opencv_flann.dir/src/flann.o] Error 1
    make[1]: *** [modules/flann/CMakeFiles/opencv_flann.dir/all] Error 2
    make: *** [all] Error 2

    ReplyDelete
    Replies
    1. Hi Saravanan,

      Sorry I didn't reply sooner. Were you able to solve the problem?

      If not, please post the complete error message you get. I could give some help.

      Delete
  2. Sadeep, I was trying to install Open CV in my MAC machine following your instructions. But it was giving 2 errors while executing the 'make' command. Can you please help anyway?

    ReplyDelete
    Replies
    1. Hi Snehasis,

      Was the CMake installation successful? Did 'cmake -G "Unix Makefiles" ..' complete without any errors?

      Please post the complete error message you get, I might be able to help.

      Delete
  3. Thanks for sharing this, Sadeep! Big help!

    ReplyDelete
  4. I tried your method in Mac OSX 10.7.5 using OpenCV-2.4.3.tar.bz2, after cmake -G "Unix Makefiles" I get the following error:

    OpenCV-2.4.3/build" does not appear to contain CMakeLists.txt

    Please let me know how to solve, thanks for the blog post, it is the closest that I had been to install OpenCV :-)

    ReplyDelete
    Replies
    1. Please try,

      cmake .. -G "Unix Makefiles"

      Delete
    2. Thank you very much for your reply!.

      I finished ok the installation with your suggestion, however when I tried the example I got this error:

      Undefined symbols for architecture x86_64:
      "cv::namedWindow(std::__1::basic_string, std::__1::allocator > const&, int)", referenced from:
      _main in main.o
      "cv::imread(std::__1::basic_string, std::__1::allocator > const&, int)", referenced from:
      _main in main.o
      "cv::imshow(std::__1::basic_string, std::__1::allocator > const&, cv::_InputArray const&)", referenced from:
      _main in main.o
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)

      I have no idea about how to solve it!.

      Thanks again!

      Delete
    3. This comment has been removed by the author.

      Delete
    4. yeah I've had this problem too. I'm not sure exactly why this happens maybe Sadeep has some insight. I guess the LLVM standard library (LSTL?) doesn't like the openCV API very much.

      Here's a workaround that's worked for me so far:
      In Build Settings, under "Apple LLVM Compiler 4.1 - Language" choose libstdc++ (GNU C standard library)

      On another note,
      Thanks Sadeep! This really helped me get going with openCV.

      Delete
    5. Hi,

      Assuming that you have added all libs as per 'step vi.)' in my post, I can't figure out the reason for this error message. Please recheck whether those libs are correctly added to your project. Pls try Allen's trick too.

      Thanks Allen for the tip. Thanks for the feedback too, glad that I could help. :)

      Delete
    6. this worked for me. Thanks Allen and Sadeep!

      Delete
  5. Loads of thanks to both, Allen Lee and Sadeep Jayasumana.

    I solved the Undefined symbols for architecture x86_64: error.

    Now the project load the image!, I will look further how to work with OpenCV

    ReplyDelete
    Replies
    1. No worries. Good to hear that it worked!

      Delete
    2. Thanks all!! This was super helpful!

      Delete
  6. Just a follow-up. I've been having linking errors again (x86_64 blah blah) this time while trying to use cvCvtColor().
    The important thing to remember is: import the required libraries!! My problem happened because I didn't import libopencv_imgproc....arrrggghh!!

    I've found a bug report on linking errors on OSX that might prove useful if you run into any more linking issues that aren't solved by adding the right libraries:
    http://code.opencv.org/issues/2412#note-11

    Thanks again Sadeep!

    ReplyDelete
  7. hi sadeep!
    i tried installing OpenCV by following these steps, however after the cmake -G "Unix Makefiles" .. command the following error occurs

    CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
    CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
    Missing variable is:
    CMAKE_C_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
    Missing variable is:
    CMAKE_C_COMPILER
    CMake Error: Could not find cmake module file:/Users/arihant/Downloads/OpenCV-2.3.1/build/CMakeFiles/2.8.10.2/CMakeCCompiler.cmake
    CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
    Missing variable is:
    CMAKE_CXX_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
    Missing variable is:
    CMAKE_CXX_COMPILER
    CMake Error: Could not find cmake module file:/Users/arihant/Downloads/OpenCV-2.3.1/build/CMakeFiles/2.8.10.2/CMakeCXXCompiler.cmake
    CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
    -- Configuring incomplete, errors occurred!

    i would appreciate if you could help me out with this

    ReplyDelete
    Replies
    1. I've had a lot of trouble building previous versions of CV (anything below 2.4.3, the current revision). Have you tried it with the latest source?

      Delete
    2. Hi Arihant,

      Looking at the error message you posted, it seems that CMake has not been installed properly on your system. Could you please double check your CMake installation? Did you use the GUI CMake installer?

      Delete
    3. Thank you anonymous and Sadeep!,
      i was able to successfully build and install OpenCV-2.4.3 on my mac, however when i build the code, another error occurs. This is the error :-


      Ld /Users/arihant/Library/Developer/Xcode/DerivedData/firstvisiontest-gcgxreseybtawlanzundevfzylxb/Build/Products/Debug/firstvisiontest normal x86_64
      cd /Users/arihant/Desktop/firstvisiontest
      setenv MACOSX_DEPLOYMENT_TARGET 10.8
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/arihant/Library/Developer/Xcode/DerivedData/firstvisiontest-gcgxreseybtawlanzundevfzylxb/Build/Products/Debug -F/Users/arihant/Library/Developer/Xcode/DerivedData/firstvisiontest-gcgxreseybtawlanzundevfzylxb/Build/Products/Debug -filelist /Users/arihant/Library/Developer/Xcode/DerivedData/firstvisiontest-gcgxreseybtawlanzundevfzylxb/Build/Intermediates/firstvisiontest.build/Debug/firstvisiontest.build/Objects-normal/x86_64/firstvisiontest.LinkFileList -mmacosx-version-min=10.8 -stdlib=libc++ -lopencv_core.2.4.3 -lopencv_core.2.4.3 -lopencv_core.2.4.3 -lopencv_highgui.2.4.3 -lopencv_highgui.2.4.3 -lopencv_highgui.2.4.3 -o /Users/arihant/Library/Developer/Xcode/DerivedData/firstvisiontest-gcgxreseybtawlanzundevfzylxb/Build/Products/Debug/firstvisiontest

      ld: library not found for -lopencv_core.2.4.3
      clang: error: linker command failed with exit code 1 (use -v to see invocation)

      could you please help out with this.

      Delete
    4. Ok..this is fixed now!
      i just added the library path and everything was working fine.

      Thank you so much Sadeep for a wonderful guide and thanks anonymous for your wonderful tip.

      Delete
    5. If you get the CMAKE_C_COMPILER_ENV_VAR Error, try to install die XCode Comandline Tools from http://developer.apple.com/technology/xcode.html

      Delete
    6. Hey @rih@ant & sadeep,
      I have encountered the same problem and I am not sure how could I add the library path as @rih@ant above mentioned.
      If anyone could help me with this, I would be very grateful.

      Delete
    7. This comment has been removed by the author.

      Delete
  8. if I have FFMPEG on My MAC ... and I want this openCV connect with it (ffmpeg works under hood the openCV)... can your method do this successfully ??
    did you see this in the terminal ?

    FFMPEG: YES\n"

    ReplyDelete
    Replies
    1. Unfortunately I don't have access to console logs of the installation now. :(

      Delete
  9. Hey I followed all your steps and I'm using OpenCV 2.4.4 and I got a build error because:

    The opencv2/opencv.hpp file was not found.

    Any suggestions?

    ReplyDelete
    Replies
    1. I had the same problem. Did you ever figure this out?

      Delete
    2. You have to configure a user defined header search path for the compiler that points to the opencv2 directory containing the opencv.hpp file.

      Here's how you do it:

      1. Open Finder on your Mac and search for the location of the file opencv.hpp (it should be in a directory called opencv2)
      2. In xCode, click on the project name in the project navigator to get to the Build Settings
      3. In the Build Settings search for "search paths"
      4. Change "Always Search User Paths" to Yes
      5. Add to "User Header Search Paths" the path to THE DIRECTORY opencv2 you found in step 1. (It should looks something like: /Users/myname/Downloads/opencv-2.4.10/include)

      #include

      should now work.

      Delete
  10. This is the error i get when i try execting make command... all the previous commands you have given executed successfully
    [ 38%] Built target lib tiff

    [ 38%] Built target opencv_core

    [ 38%] Built target opencv_imgproc

    [ 38%] Built target lib jasper

    [ 38%] Built target libjpeg

    [ 38%] Built target opencv_highgui

    [ 38%] Building CXX object modules/flann/CMakeFiles/opencv_flann.dir/src/flann.o

    In file included from /Users/indrawinarta/Downloads/OpenCV- 2.3.1/modules/flann/src/flann.cpp:29:

    In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/src/precomp.hpp:17:

    In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/all_indices.h:42:
    /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/lsh_index.h:89:81: error:
    no matching constructor for initialization of 'cvflann::LshIndexParams'
    ...input_data, const IndexParams& params = LshIndexParams(),

    ^
    /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/lsh_index.h:59:5: note:
    candidate constructor not viable: requires 3 arguments, but 0 were
    provided
    LshIndexParams(unsigned int table_number, unsigned int key_size, ...
    ^
    /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/lsh_index.h:57:8: note:
    candidate constructor (the implicit copy constructor) not viable: requires
    1 argument, but 0 were provided
    struct LshIndexParams : public IndexParams

    ^
    In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/src/flann.cpp:29:

    In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/src/precomp.hpp:10:

    In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/index_testing.h:39:

    In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/nn_index.h:39:

    In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/params.h:33:

    /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:88:67: error:
    call to function 'operator<<' that is neither visible in the template
    definition nor found by argument-dependent lookup
    virtual void print(std::ostream& out, void* const* src) { out << ...

    ^
    /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:136:44: note:

    in instantiation of member function

    'cdiggins::anyimpl::big_any_policy::print'

    requested here

    static typename choose_policy::type policy;

    ^
    /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:159:18: note:

    in instantiation of function template specialization

    'cdiggins::anyimpl::get_policy' requested

    here

    : policy(anyimpl::get_policy()), object(NULL)

    ^
    /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:276:22: note:

    'operator<<' should be declared prior to the call site or in namespace

    'cdiggins::anyimpl'

    inline std::ostream& operator <<(std::ostream& out, const any& any_val)


    ^
    2 errors generated.

    make[2]: *** [modules/flann/CMakeFiles/opencv_flann.dir/src/flann.o] Error 1

    make[1]: *** [modules/flann/CMakeFiles/opencv_flann.dir/all] Error 2

    make: *** [all] Error 2

    ReplyDelete
  11. I had an error after cmake -G "Unix Makefiles. I thought cmake wasnt installed correctly. After hours of searching I found:

    http://tech.enekochan.com/2012/07/27/cant-configure-with-cmake-in-mac-os-x-10-8-and-xcode-4-4/

    It was that I had not installed command line tools in xcode. After installing it the process seems to be working. cross fingers

    ReplyDelete
  12. Hi all,

    Before starting i'm sorry to post here but i didn't find where else to post this.
    I'm quite a begginner with OpenCV since I just Install it on my mac.

    And i've a big problem of image size.
    when I compile a code I used to work on on Linux, with many "imshow", all the image are really Huge and i can't reduce their size without loosing some information.
    (i.e I can reduce the size of the window but if I do it, i can't see all the image inside).
    And I don't have this problem on Linux.

    Does someone had this problem before ?

    Thanks you all ;)

    ReplyDelete
  13. hi thanks for the article

    i went through the instruction, but got a problem with building the project. 'lopencv_highgui' could not be found.

    for Xcode 4.6.3 and opencv 2.4.6.1 it is necessary to add 'usr/local/lib' to LIBRARY_SEARCH_PATHS

    find out here: http://opencvexperiments.wordpress.com/2012/11/15/opencvonxcode/

    cheers

    ReplyDelete
  14. Thanks Sadeep. It was a great help. :)

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. hi...Im student from Informatics engineering nice article,
    thanks for sharing :)

    ReplyDelete
  17. while building the project, there were a few errors : "Use of undeclared identifier 'errno' "...
    Please help, I can't get the demo running
    Thank!

    ReplyDelete
  18. Hi there,

    could anyone be specific about the problem posted by "NIHAR GOLIMarch 19, 2013 at 12:40 AM" .

    i had the similar problem, how can i fix it ??
    thanks a lot

    ReplyDelete
  19. Hi, I'm trying to install opencv and get the following errors after the make command:

    [ 95%] Building CXX object modules/python/CMakeFiles/opencv_python.dir/src2/cv2.cpp.o
    In file included from /Users/Oscar/opencv-2.4.6.1/modules/python/src2/cv2.cpp:1:
    In file included from /Library/Frameworks/Python.framework/Headers/Python.h:57:
    /Library/Frameworks/Python.framework/Headers/pyport.h:761:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
    #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
    ^
    1 error generated.
    make[2]: *** [modules/python/CMakeFiles/opencv_python.dir/src2/cv2.cpp.o] Error 1
    make[1]: *** [modules/python/CMakeFiles/opencv_python.dir/all] Error 2
    make: *** [all] Error 2

    Any chance you know how to fix this? thanks

    ReplyDelete
  20. For those who had problems, http://stackoverflow.com/questions/19485195/linking-opencv-to-xcode

    ReplyDelete
  21. I am new to mac and OpenCV. I have a mac air book Lion. I installed Xcode 4.6.3 and cmake-2.8.12-Darwin64-universal.dmg. I followed all the above steps with no error but some warnings, when I typed -make I received: bash: make: command not found. Please help.

    ReplyDelete
  22. Thanks for great tutorial for beginner opencv in Mac. I have trouble with installing cmake -G "Unix Makefiles" .. Please help me to solve that, i have no idea :(
    Undefined symbols for architecture x86_64:
    "cv::VideoWriter::release()", referenced from:
    vtable for cv::VideoWriter in cap.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [lib/libopencv_highgui.2.3.1.dylib] Error 1
    make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
    make: *** [all] Error 2

    ReplyDelete
  23. I have installed the opencv 2.4.6.1 on my Mac book Air with no error. However, when I tried to build the above program, I received an error "user undefined CV_ CV_WINDOW_AUTOSIZE) beside thenfollowing line in the code:
    namedWindow("image", CV_WINDOW_AUTOSIZE);

    Can you help me?

    ReplyDelete
  24. To install OpenCV using the terminal on Ubuntu:
    $ su -
    # apt-get update
    # apt-get install build-essential
    # apt-get install libavformat-dev
    # apt-get install x264 v4l-utils ffmpeg
    # apt-get install libcv2.3 libcvaux2.3 libhighgui2.3 python-opencv opencv-doc libcv-dev libcvaux-dev libhighgui-dev

    OpenCV should be installed in /usr/local/ Installation Directory

    You may also want to compile and view examples
    $ cp -r /usr/share/doc/opencv-doc/examples .
    $ cd examples
    $ cd c
    $ sh build_all.sh

    Source: http://namhuy.net/1205/how-to-install-opencv-on-ubuntu.html

    ReplyDelete
  25. Thanks, it was very helpful.
    But i did get an error " library was not found", after adding the /usr/local/lib to library search paths in build settings it was resolved.

    ReplyDelete
  26. Very useful, thank you :) !!!
    I was able to complete these steps successfully on OS X 10.8.5 (Mountain Lion) and XCode 5.0.
    I ran into a "make Error 2" issue, which was solved by installing command line tools in xcode.
    I also ran into "undefined symbols" errors which was worked around by choosing libstdc++ (GNU C++ standard library) as the "C++ Standard Library" under the "Apple LLVM 5.0 - Language - C++" category in the Build Settings.

    ReplyDelete
  27. it says "build fail" when i click on project->build on xcode. what should i do? pls help, thanks

    ReplyDelete
    Replies
    1. i mean product->build

      Delete
  28. Thanks for review, it was excellent and very informative.
    thank you :)

    ReplyDelete
  29. hi sadeep,
    Im getting the following error.
    Determining if the CXX compiler works failed with the following output:
    Change Dir: /Users/saravanand/Downloads/opencv-2.4.9/build/CMakeFiles/CMakeTmp

    Run Build Command:"/usr/bin/make" "cmTryCompileExec3939479271/fast"
    /Volumes/Server HD/Applications/Xcode 2.app/Contents/Developer/usr/bin/make -f CMakeFiles/cmTryCompileExec3939479271.dir/build.make CMakeFiles/cmTryCompileExec3939479271.dir/build
    make: /Volumes/Server: No such file or directory
    make: *** [cmTryCompileExec3939479271/fast] Error 1

    ReplyDelete
  30. Job-Shack–A contractor network site for 1,000 of the largest general contractors looking for sub-contractors in your area .
    Building product manufacturers

    ReplyDelete
  31. Hi Sadeep,

    Thanks for the blog. I have successfully finished all the instruction from " Installing Cmake" to "Installing OpenCV." However, I am stuck in the following steps because there are no results after typing /usr/local/lib in the searching box of adding files window. What might be the cause for this problem? Thank you,

    v.) A new file selector window will open. Press '/' key to open Go to folder box. Type /usr/local/lib there and hit Return.

    vi.) Select the following files from /usr/local/lib and add them to your project.

    libopencv_core.2.3.1.dylib
    libopencv_highgui.2.3.1.dylib



    ReplyDelete
  32. Great sir, is threre any special steps to follow when it install in windows + eclipse ?

    ReplyDelete
  33. I get this error


    Ld /Users/tawanda/Library/Developer/Xcode/DerivedData/OpenCVTest-biaarnoqlnwnyiawcxofqtmcdrld/Build/Products/Debug/OpenCVTest normal x86_64
    cd /Users/tawanda/sandbox/c++/opencvtest1/OpenCVTest
    export MACOSX_DEPLOYMENT_TARGET=10.11
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/tawanda/Library/Developer/Xcode/DerivedData/OpenCVTest-biaarnoqlnwnyiawcxofqtmcdrld/Build/Products/Debug -F/Users/tawanda/Library/Developer/Xcode/DerivedData/OpenCVTest-biaarnoqlnwnyiawcxofqtmcdrld/Build/Products/Debug -filelist /Users/tawanda/Library/Developer/Xcode/DerivedData/OpenCVTest-biaarnoqlnwnyiawcxofqtmcdrld/Build/Intermediates/OpenCVTest.build/Debug/OpenCVTest.build/Objects-normal/x86_64/OpenCVTest.LinkFileList -mmacosx-version-min=10.11 -Xlinker -no_deduplicate -stdlib=libstdc++ -lopencv_core.3.1.0 -lopencv_highgui.3.1.0 -Xlinker -dependency_info -Xlinker /Users/tawanda/Library/Developer/Xcode/DerivedData/OpenCVTest-biaarnoqlnwnyiawcxofqtmcdrld/Build/Intermediates/OpenCVTest.build/Debug/OpenCVTest.build/Objects-normal/x86_64/OpenCVTest_dependency_info.dat -o /Users/tawanda/Library/Developer/Xcode/DerivedData/OpenCVTest-biaarnoqlnwnyiawcxofqtmcdrld/Build/Products/Debug/OpenCVTest

    ld: library not found for -lopencv_core.3.1.0
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    ReplyDelete