当使用这个 CGAL 运行我的程序时,例如:
#include <CGAL/Epick_d.h>
我收到两条错误消息:
C1189 #error: Eigen3 is required
和
#error directive: Requires Eigen
它们分别指向 cartesian_la_base.h 和 constructors.h。 在那里我找到了以下代码:
#ifndef CGAL_EIGEN3_ENABLED
#error Requires Eigen
#endif
所以在我看来,CGAL_EIGEN3_ENABLED 标志未设置。我找不到 CGAL 或 Eigen 的问题,所以我对为什么会这样感到有点困惑。 我将环境变量设置为 .../Eigen 并将目录包含在 Properties -> c/c++ -> General -> Additional Include Directories 以及 在链接器 ->一般。
奇怪的是,从我用谷歌搜索这个问题的成功判断,似乎几乎没有其他人收到同样的错误消息。
我使用 Visual Studio 2015。
希望这是足够的信息。 干杯
最佳答案
在我的例子中,添加行
#define CGAL_EIGEN3_ENABLED
解决了这个问题。所以似乎唯一的问题是标志设置不正确。
关于c++ - CGAL 错误 : Eigen3 is required -> Eigen seems to be okay though,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40994782/