Ask Your Question
1

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

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

guy gravatar image

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

Hello,

I am running Ubuntu 15.10 and installed the current version of Eclipse Mars from eclipse.org. 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
2

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

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

Comments

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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 293 times

Last updated: Jan 31 '16