Ask Your Question
0

OpenVC 2.4.5, eclipse CDT Juno, MinGW error 0xc0000005

asked 2013-06-30 12:52:15 -0600

Nenad Bulatovic gravatar image

updated 2013-06-30 15:59:09 -0600

On Windows 7 64 bit, AMD processor, I installed OpenVC 2.4.5, with eclipse CDT Juno and MinGW, everything to the latest update. Previously eclipse CDT and MinGW compiled 100+ source files without problems. They even compile this

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>

using namespace std;

int main()
{
    IplImage* img1 = cvLoadImage("lenna.png");
    cvShowImage("MyWindow1", img1);

    cv::Mat img2;
    cv::imread("lenna.png", CV_LOAD_IMAGE_COLOR);

    cv::namedWindow("MyWindow2", CV_WINDOW_AUTOSIZE);
    cv::imshow("MyWindow2", img2);

    cvWaitKey(0);
    return 0;
}

small OpenCV source file, but when I try to Run it then it brakes with notorious

"The application was unable to start correctly (0xc0000005). Click OK to close the application."

What might be wrong and what would be solution to this problem?

  1. OpenCV (PreCompiled) is unzipped to "C:\OpenCV245PC\ (README, index.rst and CMakeLists.txt are there with all subfolders)
  2. Windows System PATH is set to C:\OpenCV245PC\build\x86\mingw\bin
  3. Eclipse GCC C++ Compiler, Include paths (-I) is set to "C:\OpenCV245PC\build\include"
  4. Eclipse MinGW C++ Linker, Library search path (-L) is set to: "C:\OpenCV245PC\build\x86\mingw\lib"
  5. Eclipse MinGW C++ Linker, Libraries (-l) are set to: opencv_calib3d245 opencv_contrib245 opencv_core245 opencv_features2d245 opencv_flann245 opencv_gpu245 opencv_highgui245 opencv_imgproc245 opencv_legacy245 opencv_ml245 opencv_nonfree245 opencv_objdetect245 opencv_photo245 opencv_stitching245 opencv_video245 opencv_videostab245
edit retag flag offensive close merge delete

Comments

"On Windows 7 64 bit, AMD proc..." < -- > "Windows System PATH is set to C:\OpenCV245PC\build\x86\mingw\bin"

can it be, you're compiling a 64bit exe, and link to the 32bit libs/dlls ?

also, if your opencv version is 2.4.5, you'd have all libs like opencv_nonfree245 (not 240), right ?

berak gravatar imageberak ( 2013-06-30 13:25:49 -0600 )edit

No, I'm not compiling binaries - they are precompiled. I tried both x64 and x86 it's the same. As for opencv_nonfree245 (not 240), you are right - but I just posted wrong from my notes (copy & paste) because I also tried for seevral other (older versions) - but for the question i ask all libs were correct: such as opencv_nonfree245 - I will edit my post, to avoid confusion.

Nenad Bulatovic gravatar imageNenad Bulatovic ( 2013-06-30 15:55:31 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-07-01 07:34:05 -0600

BM gravatar image

Hi.

I'm brand new to OpenCV and I had exactly the same problem with the latest download of OpenCV (as of last week, end June 2013) compiling under Eclipse CDT Juno, with MinGW and MSYS, on a Windows XP (32 bit) machine.

Eclipse would create an executable but would run with the 0xc0000005 error code.

Eventually I downloaded CMake and re-built the OpenCV DLLs, after that, Eclipse created an executable that ran properly and the code, in the original post above, worked as expected.

It was the first time I had used CMake (namely cmake-gui.exe) and to be honest it was a bit confusing re-compiling OpenCV, probably due to the fact that I didn't have a .rst reader to read the OpenCV documentation (I was offline at the time).

Hope that helped.

edit flag offensive delete link more
0

answered 2013-07-07 03:46:26 -0600

Nenad Bulatovic gravatar image

updated 2013-07-07 03:47:18 -0600

Finally I resolved it with compiling my own binaries as described here

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-06-30 12:52:15 -0600

Seen: 1,373 times

Last updated: Jul 07 '13