Configure MinGW, Eclipse IDE for C/C++ Developers and OpenCV 2.4.10
I spent few days to find suitable tutorial with complete information, how to configure OpenCV 2.4.10 with eclipse. New versions do not give pre-compiled binaries whereas OpenCV has support for JAVA and other languages. But it was developed in C++ and there are many ready made codes available in C/C++. Basically research community is still mostly using C++. That’s the motive to configure eclipse, MinGW and OpenCV.
Finally i got a clue and compiled my own binaries. I faced lot of errors during the rest of process.
I followed the following steps to configure OpenCV 2.4.10 with my eclipse and finally it works.
What you need to download.
- Download OpenCV 2.4.10 from here
- Download eclipse for C/C++ Developer from here
- Download MinGW from here
- Download CMake tool from here. I am using windows 7 and i downloaded executable file cmake-3.1.3-win32-x86.exe.
Once download completed you can start installation process.
OpenCV 2.4.10
- Install MinGW and add environment variable. In my case i added following paths “E:\MinGW\bin; E:\MinGW\msys\1.0\bin;”
- Unzip eclipse to a specified location.
- Extract OpenCV 2.4.10 to a specified location. In my case it is E:/opencv. All necessary files required by CMake are available in E:/opencv/sources
- Install CMake and run CMake GUI
- Choose source folder. In my case it is E:/opencv/sources
- Choose destination files. in my case i created E:/opencv/MinGW/x86
- Press configuration button, then generate button
- Exit program once the generation is done and close cmake program
- Run command prompt and go to destination directory of recently generated libraries E:/opencv/MinGW/x86
- Type “mingw32-make”. You will see a progress of building binaries.
- Add environment variable of recent generated libraries address that is E:/opencv/MinGW/x86/bin
- Go to eclipse, create a C++ project using the OpenCV code.
- Go to Project > Properties > C/C++ Build > Settings > GCC C++ Compiler > Includes, and add the source OpenCV folder. In my case it is “E:\opencv\build\include”
- Go to Project > Properties > C/C++ Build > Settings > MinGW C++ Linker > Libraries, and add all libraries one by one. Name of all libraries are listed below with image taken during configuration
- in library search path, add the opencv bin folder. In my case it is “E:\opencv\minGW\x86\bin”
- The output screen shot is here
step.libopencv_calib3d2410, libopencv_contrib2410, libopencv_core2410,
libopencv_flann2410,libopencv_gpu2410, libopencv_highgui2410,
libopencv_imgproc2410, libopencv_ml2410, libopencv_legacy2410l, libopencv_nonfree2410l, libopencv_objdetect2410,
libopencv_ocl2410, libopencv_photo2410, libopencv_stitching2410, libopencv_superres2410,
libopencv_video2410, libopencv_videostab2410, opencv_ffmpeg2410, libopencv_ml2410
Note :
Restrat eclipse or your computer once you are done with rest of configurations.
No Responses