
Double click on Other Linker Flags, click on the + button and add:.In the search field, remove your previous search and scroll down until you find the Linking section.Change Library Search Paths to usr/local/lib.Change the Header Search Paths to usr/local/include.Change the Always Search User Paths to true.
At the top, select Build Settings and search for Search Paths. Your project window will then open, select the project file (the file at the top of your project), and follow these steps: In the next window, make sure the language selected is C++ and enter the project name you’d like. Go to OSX > Application and select ‘Command Line Tool’. Open Xcode and create a new project by clicking on File > New > Project. #Now, let’s setup a basic project in Xcode. If you check inside your build > lib folder, you should see all the frameworks that have been installed. Once it’s done, run “ make -j8” in your Terminal and ‘ sudo make install’.Įverything should now be installed. This command will start installing what OpenCV needs to run. Once you moved OpenCV to a directory you’re happy with, cd into this directory and create a folder called ‘build’ with the mkdir command.Ĭd into this new folder and run ‘ cmake -G “Unix Makefiles”. Make sure you’re not going to change the location often because it could break projects. If you see the following, you’re good.įind where you downloaded OpenCV and drag it to where you want it to live. Once this is done, open a new terminal window, write ‘ port’ and press enter. INSTAL OPENCV ON MAC INSTALL
Then, go to the MacPorts project, download it and install it. To get started, visit the OpenCV website and download the correct version for your OS. I’m planning on starting a project involving computer vision using the OpenCV framework.Īs I’ve had some troubles getting everything installed and running a basic project, I’m writing this tutorial to help anyone who’s going through the same process, hoping it will make it easier :)