包括本征 [英] Including Eigen
问题描述
我在Eclipse的C ++项目中包含了 Eigen 标头.当我尝试构建时,出现此错误:
I've included the Eigen headers in a C++ project in Eclipse. When I try to build I get this error:
Symbol 'Eigen' could not be resolved Semantic Error
据我了解,这是一个链接器错误,但是Eigen是仅标头的项目,因此没有可链接的库.引发错误的代码遵循他们提供的基本教程,令人讨厌的代码段如下所示:
From what I understand, this is a linker error, but Eigen is a header-only project and thus has no library to link against. The code that throws the error follows the basic tutorial they provide, and the offending snippet looks like this:
#include <Eigen/Dense>
using namespace Eigen;
我做错了什么?如果有帮助,我可以在Linux上运行它.谢谢.
What am I doing wrong? If it helps, I'm running this on Linux. Thanks.
推荐答案
我随便摆弄一下,发现告诉Indexer为未使用的标头建立索引可以解决我的问题.
I was fiddling around and found that telling the Indexer to index unused headers resolved my problem.
感谢您成为一名优秀的球员.有点抱歉,我自己偶然发现了它.
Thanks for being on the ball guys. Kind of sorry I stumbled upon it myself.
这篇关于包括本征的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!