一、先去官网下载 eigen,解压安装包,根据INSTALL文件提示
1、mkdir buile_dir
2、cd buile_dir
3、cmake .. 报错
错误信息为:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLUT_Xmu_LIBRARY (ADVANCED)
linked by target "openglsupport" in directory /home/hai/eigen-eigen-10219c95fe65/unsupported/test
-- Configuring incomplete, errors occurred!
google错误信息后 eigen.tuxfamily.org/bz/show_bug.cgi?id=510
修改为 cmake -DEIGEN_TEST_NO_OPENGL=1 .. 成功
错误信息为:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GLUT_Xmu_LIBRARY (ADVANCED)
linked by target "openglsupport" in directory /home/hai/eigen-eigen-10219c95fe65/unsupported/test
-- Configuring incomplete, errors occurred!
google错误信息后 eigen.tuxfamily.org/bz/show_bug.cgi?id=510
修改为 cmake -DEIGEN_TEST_NO_OPENGL=1 .. 成功
4、make
5、sudo make install
二、qt中调用eigen库
然后当自己需要使用到Eigen时,在相应的集成开发环境下添加Eigen所在的头文件目录即可,比如我在Qt下开发,使用的是QtCreator,则需要在工程文件*.pro下添加如下:
二、qt中调用eigen库
然后当自己需要使用到Eigen时,在相应的集成开发环境下添加Eigen所在的头文件目录即可,比如我在Qt下开发,使用的是QtCreator,则需要在工程文件*.pro下添加如下:
INCLUDEPATH += /usr/local/include/eigen3/Eigen