Ask Your Question
1

OpenCV Paths Headaches in Eclipse

asked 2012-07-28 16:48:25 -0500

Ted gravatar image

updated 2012-07-29 01:32:46 -0500

Kirill Kornyakov gravatar image

Hello,

I am trying to develop OpenCV (2.4.2) C++ applications on Windows XP, using the Eclipse SDK (3.7.2) with the CDT plugin. I'm ultimately interesting in porting the code to Android, but am just trying to get a simple Windows EXE to compile in Eclipse for now. For the life of me, I cannot figure out how to set up the include and library paths in Eclipse. I've read text after text on the matter and not ONE of them really helps. Time and again I've seen references to the CV directory within the OpenCV directory structure, which doesn't even exist anymore in the current 2.4.2 version. There are eight 'highgui' directories, and a whopping 37 'include' directories.

Can anyone please tell me exactly what OpenCV directories (header and library) are needed to compile successfully in Eclipse? Thank you.

edit retag flag offensive close merge delete

Comments

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-29 01:34:27 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-07-29 16:57:36 -0500

Ted gravatar image

Hi again,

I was finally able to get past the dreaded:

I:\Android\OpenCV242\include\opencv/cv.h:63:33: fatal error: opencv2/core/core_c.h: No such file or directory

compile error. I still haven't been able to do so with OpenCV ver2.4.2. But I tried ver2.0.0 and did get past the error with:

  • the Windows environment variable OPENCV_DIR being set to: "I:\Android\OpenCV2.0"
  • the Windows PATH including: %OPENCV_DIR%\bin
  • the Eclipse project Properties->Settings->Includes being set to: "I:\Android\OpenCV2.0\include\opencv" and "I:\Android\OpenCV2.0\include"

Similar settings for ver2.4.2 (with a correspondingly different install directory, of course) do not find core_c.h. Of course, I still need to employ the newer version at some point. So, can anyone tell me what I must change to get 2.4.2 to work at least to the point that 2.0 has? Any advice about 242's directory structure?

Sorry if my questions are simplistic. I am admittedly a newbie. Thanks, Ted

edit flag offensive delete link more

Comments

Sorry, but you are developing for Android or desktop? If the former, I suppose you know that there are 2 special tutorials, and they work for 2.4.2.

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-31 16:16:33 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2012-07-28 16:48:25 -0500

Seen: 1,065 times

Last updated: Jul 29 '12