Ask Your Question

Can't get opencv to work with eclipse mars (ubuntu 15.10)

asked 2016-01-31 07:01:57 -0500

guy gravatar image

updated 2016-01-31 07:04:25 -0500


I am running Ubuntu 15.10 and installed the current version of Eclipse Mars from Then I installed the latest version of opencv from the git repository and tried to set up the project described in this tutorial. I followed the tutorial step by step but when I try to build it, I receive the following errors:

image description

My libs are in /usr/local/libs and my includes in /usr/local/include/opencv and I inserted these paths in the project properties just as described in the tutorial.

What am I doing wrong? I already suceeded to run opencv in VisualStudio in Windows 10 and in XCode in Mac OS X. But with Eclipse in Ubuntu it won't work.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-31 07:06:12 -0500

berak gravatar image

please do not use the outdatded c-api headers like cv.h , but the c++ ones.

#include "opencv2/opencv.hpp"

should be all you need.

edit flag offensive delete link more


Thanks for your quick answer. That solved the problem.

Note: I also needed to include opencv2/imgcodecs.hpp and add opencv_imgcodecs to Libraries (-l)

guy gravatar imageguy ( 2016-01-31 07:14:29 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-01-31 07:01:57 -0500

Seen: 184 times

Last updated: Jan 31 '16