c++ - CGAL 错误 : Eigen3 is required -> Eigen seems to be okay though

标签 c++ visual-studio-2015 eigen cgal

当使用这个 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/

相关文章:

c# - MVVM 分离程序集 Visual Studio : What should I choose as the project types?

c++ - 无法使用 glm::vec2 作为矩阵的标量类型并使用线性最小二乘法求解

c++ - 调试断言失败

c++ - 将打印作业重新路由到另一台打印设备

c++ - 构造函数内的错误 C2512 : no appropriate default constructor available: declaration of a object with arguments!

c++ - 加载共享库时出错 : libGLEW. so.1.10:无法打开共享对象文件

c++ - 在 Microsoft Visual Studio 2015 的 C++ 项目中包含 Armadillo C++ 库

visual-studio-2015 - TFS 2015在一个目录中发布构建工件

c++ - 重载 Eigen::MatrixBase<T>

c++ - 将 Eigen::SparseMatrix 转换为 cuSparse,反之亦然