如何将Eigen库添加到C ++项目

如何将Eigen库添加到C ++项目

问题描述:

可能是一个愚蠢/简单的问题,但我一直找不到答案。我不知道如何在CodeBlocks c ++中添加库。我从 http://eigen.tuxfamily.org/index.php下载了.zip文件? title = Main_Page 并将文件提取到我的目录中。我现在如何在我的项目中使用该库?

Probably a dumb / simple question, but I have not been able to find an answer. I have no clue how adding libraries works with CodeBlocks c++. I downloaded the .zip file from http://eigen.tuxfamily.org/index.php?title=Main_Page and extracted the files into my directory. How can I use this library now in my project?

这是模板库。您可以将其放置在路径中的任何位置(可访问)。
只需包含适当的标头即可。无需链接任何内容,所有内容都在标题中。

It's a template library. You can put it anywhere as long as it's in the path (accessible). Just include the proper headers and it should work. No need to link anything, everything is in the headers.