- Download the zip from Eigen's website[Click me to enter]
- Unzip to the root directory of the current project (you can of course choose your own directory)
- Add this sentence anywhere in the current project
include_directories(${CMAKE_SOURCE_DIR}/eigen)
- This is the time to test the success of the introduction by adding the
#include <Eigen/Dense>
If the path appears, then the import is successful and you can use it.
Summary, I initially thought that introducing external libraries was troublesome and difficult, it turns out to be a man of action, in fact, introducing external projects from download to compile successfully is only about 3 minutes, do not think it is difficult and do not take action!!!!