Skip to content

Library

Horie edited this page May 4, 2024 · 7 revisions

Eigen Library Installation

  1. Download Eigen Library:

  2. 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
      
  3. 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
      
  4. Linking the Library:

    • Add the following lines to your CMakeLists.txt file to link the Eigen library:
      find_package (Eigen3 3.3 REQUIRED NO_MODULE)
      target_link_libraries (your_target Eigen3::Eigen)
      Replace your_target with the name of your target in CMakeLists.txt.

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.

Clone this wiki locally