System information (version)
- OpenCV => 4.1.1
- Operating System / Platform => Linux Debian 9
- Compiler => GCC 6.3.0
Detailed description
I encountered an error with #include <Eigen/core> when building OpenCV 4.1.1 even though Eigen is installed on the system and is found by cmake.
[ 1%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Half/half.cpp.o In file included from /home/user/OpenCV/opencv-4.1.1/modules/imgproc/src/precomp.hpp:50:0, from /home/user/OpenCV/build/modules/imgproc/opencv_imgproc_pch_dephelp.cxx:1: /home/user/OpenCV/opencv-4.1.1/modules/core/include/opencv2/core/private.hpp:66:24: fatal error: Eigen/Core: No such file or directory # include <Eigen/Core>
Please find attached my CMakeCache.txt.
Temporary workaround that solved the issue:
Add -I<path-to-include/eigen3> to CMAKE_CXX_FLAGS.
Steps to reproduce
- Download code of OpenCV 4.1.1
- Build with configuration specified in CMakeCache.txt.
System information (version)
Detailed description
I encountered an error with #include <Eigen/core> when building OpenCV 4.1.1 even though Eigen is installed on the system and is found by cmake.
[ 1%] Building CXX object 3rdparty/openexr/CMakeFiles/IlmImf.dir/Half/half.cpp.o In file included from /home/user/OpenCV/opencv-4.1.1/modules/imgproc/src/precomp.hpp:50:0, from /home/user/OpenCV/build/modules/imgproc/opencv_imgproc_pch_dephelp.cxx:1: /home/user/OpenCV/opencv-4.1.1/modules/core/include/opencv2/core/private.hpp:66:24: fatal error: Eigen/Core: No such file or directory # include <Eigen/Core>Please find attached my CMakeCache.txt.
Temporary workaround that solved the issue:
Add
-I<path-to-include/eigen3>toCMAKE_CXX_FLAGS.Steps to reproduce