gpu_flow
gpu_flow copied to clipboard
build fails with fatal error
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
I am having this issue, how have you solved it?
no, ended up using something else for that project.
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:
- Download OpenCV 2.4.13.6 Sources from https://opencv.org/releases.html
- 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) - I then built OpenCV with MinGW64 in C:\opencv\build
- 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.