遇到错误1:fatal error: unsupported/Eigen/MatrixFunctions: 没有那个文件或目录
#include <unsupported/Eigen/MatrixFunctions>
建立软链接:sudo ln -s eigen3/unsupported/ unsupported
遇到错误:/usr/include/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h:138:24: error: ‘nested’ in namespace ‘Eigen::internal’ does not name a template type
typename internal::nested<MatrixType>::type m_M;
在include "opencv2/core/eigen.hpp"之前必须先include "eigen3/Eigen/Dense"或#include<Eigen/Dense> 两种包含方式和EIGEN安装时文件安装位置有关
将#include <Eigen/Core>
#include <Eigen/Dense>位置提前
#include </usr/include/eigen3/unsupported/Eigen/MatrixFunctions>放在最后
同时sudo ln -s eigen3/Eigen/ Eigen,这种设置是因为可能找不到<Eigen/Core>,<Eigen/Dense>这两个文件位置,而这两个文件内定义了nested等类型.