Ask Your Question

acron's profile - activity

2014-06-30 01:21:46 -0600 commented question Cannot Debug code using Eclipse, MinGW and OpenCV 2.4.7

After recreating a new project, the debugging started to work

2014-06-28 18:45:26 -0600 asked a question Cannot Debug code using Eclipse, MinGW and OpenCV 2.4.7

I need help to get Eclipse (Kepler CDT ) debugging working for OpenCV. Without OpenCV, I am able to step through the code; as soon as I linked with OpenCV libs, the debugging stopped working. Further, I cannot even run the generated Test.exe from Eclipse. I have to run it from the command-line.

I downloaded OpenCV 2.4.7 and then compiled it for MinGW using CMake (UI) (with SSE disabled and CMAKE_BUILD_TYPE set to Debug).

The generated files looked right: in the bin directory, I have files like this: libopencv_core247d.dll

in the lib directory I have files like this: libopencv_core247d.dll.a

The generated mingw/bin directory is in the PATH and mingw/lib is set to be the LIB search directory.

These are the commands used to compile and link the code:

Info: Internal Builder is used for build g++ "-IC:\opencv-247\build\include" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\Test.o" "..\src\Test.cpp" g++ "-LC:\opencv-247\build\x86\mingw\lib" -o Test.exe "src\Test.o" -lopencv_highgui247d -lopencv_core247d -lopencv_imgproc247d

I got Test.exe, but I cannot run it from Eclipse. However, I can run the file from the command line.

Test.cpp has only a few lines to load an image and then display it.

2014-06-26 02:35:07 -0600 received badge  Editor (source)
2014-06-26 02:34:48 -0600 answered a question after reboot undefined reference to `cv::imread(std::string const&, int)'

I wonder how you built opencv using mingw? I tried to use CMake, but I got some configuration errors such as ANT_EXECUTABLE-NOTFOUND. How can I build c++ only?

thank you for your help!