Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails with fatal error #5

Open
tkoham opened this issue Sep 21, 2017 · 3 comments
Open

build fails with fatal error #5

tkoham opened this issue Sep 21, 2017 · 3 comments

Comments

@tkoham
Copy link

tkoham commented Sep 21, 2017

On centos 7 and all dependencies installed, make fails with:

 fatal error: opencv2/gpu/gpu.hpp: No such file or directory
 #include "opencv2/gpu/gpu.hpp"

using qt 5.6, opencv 2.4.8

@kasparov92
Copy link

I am having this issue, how have you solved it?

@tkoham
Copy link
Author

tkoham commented Aug 20, 2018

no, ended up using something else for that project.

@audreyls
Copy link

audreyls commented Nov 13, 2018

For anyone looking at this later, I fixed this by building OpenCV myself instead of using the pre-built binaries and specifying the OpenCV directory to CMake. The error above is because CMake isn't finding the correct OpenCV files. I'm using Windows, but hopefully this step-list is helpful for anyone else having this issue:

  1. Download OpenCV 2.4.13.6 Sources from https://opencv.org/releases.html
  2. Use CMake to make the files for MinGW Makefiles (if it fails to build in the next step, try adding the -DENABLE_PRECOMPILED_HEADERS=OFF flag)
  3. I then built OpenCV with MinGW64 in C:\opencv\build
  4. I specified the OpenCV directory to the system (In Windows CMD: setx -m OPENCV_DIR "C:\opencv\build") Or alternatively, just specify that to CMake when making gpu_flow.

Takeaway is that building OpenCV yourself from sources seems to fix this problem, or at least it did for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants