I'm writing object tracking software in C++ and using OpenCV and highgui. The problem I have right now is that even after sudo yum install opencv and using the yumex frontend to ensure that all of the packages were installed, cv.h is not found when I try to compile.

I looked in /usr/include/ and there's no trace of opencv. What's going on and how can I fix this?

link|improve this question

79% accept rate
feedback

1 Answer

up vote 2 down vote accepted

Did you install the -devel packages?

Redhat/Fedora splits software into both runtime (which is what you probably have installed) and developer (headers, static libs) packages. It names these developer packages PACKAGENAME-devel.

Check your install, see if you can install the necessary opencv-devel package(s).

link|improve this answer
I installed opencv-devel and still get this error. – tekknolagi Feb 8 at 18:15
@tekknolagi did you verify if the files are around? try: rpm -q --filesbypkg opencv-devel and see where it put the files – Rich Homolka Feb 8 at 18:20
@tekknolagi so it installed it, but not directly in /usr/include. You need to adjust your build to pick up the location, -I/usr/include/opencv – Rich Homolka Feb 8 at 18:38
Thank you! Great job. – tekknolagi Feb 8 at 18:50
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.