Jos*_*nto 6 installation 12.10 cmake
Eigen是一个用于线性代数的 C++ 模板库:矩阵、向量、数值求解器和相关算法。我一直在安装它时遇到问题。当我运行从Eigen 网站下载的 tarball 中提取的源目录的位置在cmake '/home/brentonhorne/eigen-eigen-5097c01bcdc4哪里时,收到错误消息:/home/brentonhorne/eigen-eigen-5097c01bcdc4
CMake Error at CMakeLists.txt:8 (message):
In-source builds not allowed. Please make a new directory (called a build
directory) and run CMake from there. You may need to remove
CMakeCache.txt.
-- Configuring incomplete, errors occurred!
Run Code Online (Sandbox Code Playgroud)
请告诉我如何克服这个障碍。我不太懂编程,但如果你能向我解释我需要做什么,将什么粘贴到终端中,我可以做到!如果需要帮助我,我正在运行 12.10。
如果您需要了解源目录中 INSTALL 文件的内容,它们是:
Installation instructions for Eigen
***********************************
Explanation before starting
***************************
Eigen consists only of header files, hence there is nothing to compile
before you can use it. Moreover, these header files do not depend on your
platform, they are the same for everybody.
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
The "make install" step may require administrator privileges.
You can adjust the installation destination (the "prefix")
by passing the -DCMAKE_INSTALL_PREFIX=myprefix option to cmake, as is
explained in the message that cmake prints at the end.
Run Code Online (Sandbox Code Playgroud)
小智 8
我不熟悉 Eigen,但从错误消息来看,它似乎需要“源外”构建。
这意味着如果您已将 Eigen 下载并解压缩到 /home/brentonhorne/eigen-eigen-5097c01bcdc4,那么您应该完全在 Eigen 根目录之外创建一个新目录,例如 /home/brentonhorne/build_eigen 并从那里运行 CMake。我猜是这样的:
mkdir /home/brentonhorne/build_eigen
cd /home/brentonhorne/build_eigen
cmake /home/brentonhorne/eigen-eigen-5097c01bcdc4
make
sudo make install
Run Code Online (Sandbox Code Playgroud)
需要注意的是,Eigen 库可以作为包安装。
sudo apt-get install libeigen3-dev对于最新的图书馆和sudo apt-get install libeigen2-dev这个问题中提到的图书馆。
| 归档时间: |
|
| 查看次数: |
25201 次 |
| 最近记录: |