Debugging

Eclipse C/C++ 환경에 Eigen Library 추가 방법

ingus kinematics 2022. 1. 3. 21:23

http://eigen.tuxfamily.org/index.php?title=Main_Page 

 

Eigen

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. Get it The latest stable release is Eigen 3.4.0. Get it here: tar.bz2, tar.gz, zip. Changelog. The latest 3.3 release is Eigen 3.3.9. Get it h

eigen.tuxfamily.org

우선 Eigen Library를 다운로드 해줍시다.

그리고 압축을 풀고 이름을 Eigen으로 바꿔주고(안 바꿔도 상관 없지만 아래에서부터 조금씩 달라짐...)

원하는 폴더에 위치시켜줍니다.

 

저같은 경우 뉴로메카 사의 STEP PC를 사용하는데 따로 include 폴더가 있어서 여기 안에 추가해주었습니다.

 

 

 

http://eigen.tuxfamily.org/index.php?title=IDEs 

 

IDEs - Eigen

Some workarounds and hacks might be useful for IDEs in order to use Eigen in an optimal way. This page is meant to collect them, to help newcomers. Eclipse CDT Paths Apart from "Organize includes" (see the section below), everything works out of the box. F

eigen.tuxfamily.org

그리고 이 링크를 따라서 그대로 실행해보았습니다.

 

우선 프로젝트의 properties에 들어가면 아래와 같은 창이 뜹니다.

 

 

"Project Properties > C/C++ General > Paths & Symbols > Includes > GNU C++" 여기 안에 들어가주시면

 

 

여기 Add 버튼을 눌러주세요

 

File System 클릭하면

 

 

여기 include 폴더를 선택해서 버튼을 눌러주세요

 

그리고 사용하실 .cpp 파일에서

 

이렇게 추가해서 사용하시면 됩니다.