【发布时间】:2013-06-01 01:35:32
【问题描述】:
我下载了最新版本,并完全按照其自述文件中的描述执行方法2:
Method 1. Installing without using CMake
****************************************
You can use right away the headers in the Eigen/ subdirectory. In order
to install, just copy this Eigen/ subdirectory to your favorite location.
If you also want the unsupported features, copy the unsupported/
subdirectory too.
Method 2. Installing using CMake
********************************
Let's call this directory 'source_dir' (where this INSTALL file is).
Before starting, create another directory which we will call 'build_dir'.
Do:
cd build_dir
cmake source_dir
make install
终端显示它已正确安装,并且从 eclipse 包含文件夹中我可以看到它已安装在 usr/local/include 中,
但是当我在eclipse中编译以下测试程序时,我得到了这个:
#include <iostream>
#include <Eigen/Dense>
using Eigen::MatrixXd;
int main()
{
MatrixXd m(2,2);
m(0,0) = 3;
m(1,0) = 2.5;
m(0,1) = -1;
m(1,1) = m(1,0) + m(0,1);
std::cout << m << std::endl;
}
请帮帮我,谢谢!
【问题讨论】:
-
从屏幕截图来看,您已将标题放在
eigen3目录而不是Eigen目录中。 -
我应该放在哪里?谢谢。
-
查找包含
Dense的名为Eigen的文件夹,并确保它在您的目录结构中位于/usr/local/include的正下方。 (我只是在这里猜测......首先尝试让它在命令行上工作以减少可变因素的数量)
标签: c++ eclipse installation eigen