Ask Your Question
0

Trouble setting up OpenCV (unhandeled exeptions & missing files)

asked 2012-11-27 16:55:44 -0600

Foaly gravatar image

Hello everybody,

I want to use OpenCV for a project, so I downloaded the precompiled binarys. (Working on Windows 7 with MinGW (gcc 4.7.2)) I installed everything and the sample project I set up compiled fine, but whenever I tried to execute the program I got an unexpected exception 0xc0000005. I played around, but nothing worked. So I thought it might be because the .dlls were compiled with an older version of gcc (maybe 4.6 or something)

So I downloaded the source and set everything up. It took a long while, but it finally compiled. So now I have (hopefully working) .dlls, but as I tried to test them with a sample project, I got the error: "opencv2/core/core_c.h: No such file or directory" when I use #include <opencv2/opencv.hpp> but the include directory from the git repository is definitely included in the project...

I am really lost at this point. I would love to use the precompiled binarys, but I am also willing to compile my own from source. I just need something that works :)

Please help me I would love to use this awesome library! Thanks in advance, Foaly

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-11-28 01:08:41 -0600

Daniil Osokin gravatar image

Hi! You can use include directory from prebuilt binaries package (opencv\include).

edit flag offensive delete link more

Comments

Thanks! I already thought about that, but it seems like a bad hack to me, because the prebuilt package is version 2.4.3 and the one from git is 2.4.9 Also I don't get why there are no include files in the source i grabed from git... there has to be!

Foaly gravatar imageFoaly ( 2012-11-28 05:12:12 -0600 )edit
1

Ok, without this "hack" you can do the following: after you open OpenCV solution (generated by cmake) in Visual Studio, build the "Install" target. After that, you will have "opencv\install" folder, where will be necessary "include" folder. P.S. if you clone 2.4.3 tag from git, you have the same version of headers with the prebuilt version.

Daniil Osokin gravatar imageDaniil Osokin ( 2012-11-28 05:49:40 -0600 )edit

Oh my god!!! You saved the day! Thank you so much! I am working with Code::Blocks and I clicked Building Target "all" which complied the .dll, but somehow didn't install it. So now I built the "install" Target and it copied everything I need into the install directory! Thanks again!!

Foaly gravatar imageFoaly ( 2012-11-28 06:23:08 -0600 )edit

Question Tools

Stats

Asked: 2012-11-27 16:55:44 -0600

Seen: 327 times

Last updated: Nov 28 '12