ubuntu 18.04编译opencv 3.4.7问题与解决方法汇总

问题1: 找不到eigen

[  1%] Built target gen-pkgconfig
[  3%] Built target libjasper
[  8%] Built target libprotobuf
[  9%] Built target quirc
[  9%] Built target ittnotify
[  9%] Building CXX object modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o
In file included from /home/hri/MyInstallSoftware/opencv-3.4.7/modules/core/test/test_precomp.hpp:12:0,
                 from /home/hri/MyInstallSoftware/opencv-3.4.7/build/modules/core/opencv_test_core_pch_dephelp.cxx:1:
/home/hri/MyInstallSoftware/opencv-3.4.7/modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
 #  include <Eigen/Core>
            ^~~~~~~~~~~~
compilation terminated.
modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o] Error 1
CMakeFiles/Makefile2:1532: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

问题1: 解决办法

  1. 查看系统eigen的安装路径, 我的安装地址为:
    \usr\local\include\eigen3
  2. 查看出错的代码,
gedit /home/hri/MyInstallSoftware/opencv-3.4.7/modules/core/include/opencv2/core/private.hpp

出现的代码如下:

#ifdef HAVE_EIGEN
#  if defined __GNUC__ && defined __APPLE__
#    pragma GCC diagnostic ignored "-Wshadow"
#  endif
#  if defined(_MSC_VER)
#    pragma warning(push)
#    pragma warning(disable:4701)  // potentially uninitialized local variable
#    pragma warning(disable:4702)  // unreachable code
#    pragma warning(disable:4714)  // const marked as __forceinline not inlined
#  endif
#  include <Eigen/Core>
#  if defined(_MSC_VER)
#    pragma warning(pop)
#  endif
#  include "opencv2/core/eigen.hpp"
#endif
  1. # include <Eigen/Core>改成# include <eigen3/Eigen/Core>

问题2: ippicv

在cmake 的过程中,卡在了
IPPICV: Download: ippicv_2017u2_lnx_intel64_20170418.tgz

问题2: 解决方法

参考博客:
https://blog.csdn.net/qq_22945165/article/details/84312374

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值