How to use OpenCV in Eclipse C++ on Yosemite?

asked 2015-05-21 13:23:41 -0500

AspireStone3 gravatar image

Hi everyone, I've to work with OpenCV 3.0.0 on my Mac OS X Yosemite with Eclipse for C++ and I've already installed OpenCV on my computer and included it in my project. The problem is that I can't use it in any of my projects because the IDE gives me always millions of errors. I think that Eclipse doesn't find the libraries and the .hpp files, but how can I solve it?
Here is an image that can explain the problem (with, on the left, OpenCV included).image description
Thank you all for your answers!

edit retag flag offensive close merge delete

Comments

Hmmm, aren't you including the wrong folder? The one with all the modules' headers is opencv2, not opencv

LorenaGdL gravatar imageLorenaGdL ( 2015-05-22 05:19:16 -0500 )edit

Hi, thank you, I've included also the opencv2 but the result doesn't change unfortunately, but is it normal that the two folders opencv and opencv2 are in the same level inside /usr/local/include?

AspireStone3 gravatar imageAspireStone3 ( 2015-05-23 08:21:30 -0500 )edit

You need to include the folder that contains files like "core.hpp" or "imgproc.hop", and also set the linker properly. Check this tutorial: http://docs.opencv.org/doc/tutorials/...

LorenaGdL gravatar imageLorenaGdL ( 2015-05-23 11:53:17 -0500 )edit