Ask Your Question
1

New to OpenVC, error 0xc0000005 running demhist.cpp(and most others)

asked 2013-03-02 18:56:29 -0600

nickwalt10 gravatar image

Hello, I am new a to opencv and i have downloaded opencv 2.4.4 and incorporated it with code::blocks. The opencv folder is on my desktop and i have added the environmental variable path: C:\Users\UserName\Desktop\opencv\build\x86\mingw\bin as well as have linked all the dll's in code::blocks and included:
C:\Users\UserName\Desktop\opencv\build\include to the compiler and: C:\Users\UserName\Desktop\opencv\build\x86\mingw\lib to the linker.

Now, MY QUESTION: Whenever I try to run the .cpp file in the sample section "demhist.cpp" i get the following error: "This application was unable to start correctly (0xc0000005). Click ok to exit the application."

I have no idea what i did wrong, if anything. I dont think this has to do with it i commented out: //C:\Users\UserName\Desktop\opencv\build\x86\mingw\bin which is located just under using namespace. I commented it out because the program would not compile saying " stray '\' in program.

Any help to get this working is much appreciated as I hope to learn OpenCV and use a webcam to control my robot i am working on.

THANK YOU!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-03-03 02:45:00 -0600

berak gravatar image

updated 2013-03-03 02:47:09 -0600

first of all congratulations for getting stuff to compile & link!

what you're now facing is a runtime error, somehow your program tries to load the wrong dlls.

there's different flavours of them in the build folder, if you're compiling for 64bit, it needs to load the 64bit dlls, resp. for 32 bits.

you had to append to the PATH variable for opencv, right ? does it point to the right folder ? check again.

also, don't link release code to debug dlls, or the other way round. if you find a lib ending with d in your release linker settings, trouble. if you find one missing the d in debug mode, same.

edit flag offensive delete link more

Comments

It was no easy task to research and get everything to work together that's for sure. I have the 64x dlls linked, i tried to use the 32x and I the program wont even compile so i have the right dlls. All the dlls have the .a, there aren't any .d's.

The only thing im not 100% on is the Path variable, im pretty sure i have it set to the correct place for openCV as mentioned above, do i need to add another one for codeblocks itself?

nickwalt10 gravatar imagenickwalt10 ( 2013-03-03 14:58:08 -0600 )edit

Question Tools

Stats

Asked: 2013-03-02 18:56:29 -0600

Seen: 1,062 times

Last updated: Mar 03 '13