0
votes

I am trying to configure opencv 2.4 (pre-built) for eclipse in windows 7. For this I did the followings:

  1. Installed OpenCV-2.4.0.exe in D:\opencv

  2. Installed Eclipse CDT

  3. Added D:\opencv\build\x64\mingw\bin to the windows system variable PATH

  4. Created a simple "Helo World" opencv project in eclipse.

  5. Added D:\opencv\build\include\opencv and D:\opencv\build\include\opencv2 to the Include Paths (-I) in eclipse

  6. Added D:\opencv\build\include\opencv2\core\core_c.h and D:\opencv\build\include\opencv2\core\core.hpp and D:\opencv\build\include\opencv2\core\types_c.h to the Include files (-include) in eclipse

  7. Added D:\opencv\build\x64\mingw\lib to the Library search path (-L) in eclipse

When I build the project eclipse reports: "fatal error: opencv2/core/types_c.h: No such file or directory" Did I forget something?

Thanks for your help.

1
i dont know about eclipse but you should add "d:\opencv\build\include\" to your include search pathMohammad

1 Answers

0
votes

It's abit tricky for this. If you did observe, the missing file path is " *opencv2/*core/types_c.h" Therefore, i added these two in the include path: 1.) D:\opencv\build\include\opencv 2.) D:\opencv\build\include

(2) Will resolve the path issue. However, i don't think this is the best solution. I used this workaround for eclipse and netbeans.

Here's a link for openCV 2.2. It the same project setup as 2.2

http://opencv.willowgarage.com/wiki/VisualC%2B%2B Refer to this section: "Building your own projects using OpenCV 2.2 in Visual Studio" The listed directories and libs setup should be similar for various IDEs

Hope this helps! Cheers!