Ask Your Question
0

Missing header files in OpenCV 2.4.3 pre-built library install

asked 2013-02-13 12:41:10 -0600

Nate gravatar image

updated 2013-02-13 12:41:51 -0600

Hello. I have downloaded the pre-built library package for OpenCV 2.4.3, and have followed the short installation routine described on the "Installation for Windows" page. I have Visual Studio set up to check the paths for the header files as well as the library files to link against. It finds the header files just fine.

The problem is, the header file "cv.h" refers to a number of other header files that do not exist. These are: "opencv2/core/core_c.h", "opencv2/core/core.hpp", "opencv2/imgproc/imgproc_c.h", "opencv2/imgproc/imgproc.hpp", "opencv2/video/tracking.hpp", "opencv2/features2d/features2d.hpp", "opencv2/flann/flann.hpp", "opencv2/calib3d/calib3d.hpp", "opencv2/objdetect/objdetect.hpp", "opencv2/legacy/compat.hpp".

I have the directory "include/opencv2", but the only file it contains is "opencv.hpp". None of the files listed above exist in it.

So my question is, what is going on here? Are the installation instructions missing a step or five? How do I fix it and get my program to compile?

If it makes any difference, I am using Visual Studio 2008 on a Windows 8 machine.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-02-13 13:09:16 -0600

berak gravatar image

updated 2013-02-13 13:18:21 -0600

it'll work all fine, once you point your include dir at 'build\include' instead of 'include'

if you prefer not to, and keep working with the 'include' folder, you'll have to manually add all paths to the modules, like 'modules\core\include' 'modules\highgui\include' etc.

edit flag offensive delete link more

Comments

Thank you very much. The problem was that I was using the wrong "include" directory for header files.

Thanks again!

Nate gravatar imageNate ( 2013-02-13 13:34:25 -0600 )edit
0

answered 2014-07-04 10:12:53 -0600

wpqs gravatar image

include "cv.h" brings in lots of header files, most them you probably don't need. This unnecessarily increases your build time. A better solution is only include the headers for the functions you are actually using. Unfortunately, this key information is missing from the ref manual. It really would be helpful if the documentation for each function listed the header files it needs and the .lib dependencies.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-02-13 12:41:10 -0600

Seen: 6,140 times

Last updated: Jul 04 '14