-
Notifications
You must be signed in to change notification settings - Fork 1
Library
Horie edited this page May 4, 2024
·
7 revisions
-
Download Eigen Library:
- Download the latest stable release from Eigen's official website.
-
Check CMake Installation:
- Before proceeding, ensure that CMake is installed on your computer. You can check this by running the following command in your terminal:
cmake --version
- Before proceeding, ensure that CMake is installed on your computer. You can check this by running the following command in your terminal:
-
Installation Steps:
- Open the terminal and navigate to the directory where you downloaded Eigen.
cd path/to/eigen - Create a build directory:
mkdir build cd build - Run CMake to configure the build:
cmake .. - Install Eigen using:
sudo make install
- Open the terminal and navigate to the directory where you downloaded Eigen.
-
Linking the Library:
- Add the following lines to your
CMakeLists.txtfile to link the Eigen library:Replacefind_package (Eigen3 3.3 REQUIRED NO_MODULE) target_link_libraries (your_target Eigen3::Eigen)
your_targetwith the name of your target in CMakeLists.txt.
- Add the following lines to your
Replace path/to/eigen with the actual path to the directory where you downloaded Eigen. After following these steps, Eigen should be successfully installed on your system.