不能在Cygwin中进行CGAL例子

Cannot make CGAL examples in Cygwin

本文关键字:CGAL 例子 Cygwin 不能      更新时间:2023-10-16

我无法在Cygwin下构建一些CGAL示例。所有失败的示例共享类似的错误消息。

任何指导都将不胜感激。

以下是我遵循的步骤,也是" make"的示例错误。

cygwin(x64)安装在Windows 7到D: Cygwin64。

CGAL源从https://github.com/cgal/cgal/releases/download/releases/cgal-4.9/cgal-4.9.zip下载。并解开为d: cygwin64 usr cgal-4.9

据认为CGAL所需的所有库都是通过Cygwin X64设置安装的。

初始cmake:

   CD/USR/CGAL-4.9    CMAKE -DCMAKE_LEGACY_CYGWIN_WIN32 = 1 -DWITH_CGAL_QT5 = OFF -DWITH_EXAMPLES = ON。

无法配置一些示例,其中包括 mesh 和scale_space_reconstruction_3示例。

   CD/USR/CGAL-4.9    制作    举例

最初的几个示例成功创建了。例如,

   路径=/usr/local/bin:/usr/bin:/bin:/lib:/usr/cgal-4.9/bin:/usr/cgal-4.9/lib    cd/usr/cgal-4.9/examples/aabb_tree    ./aabb_triangle_3_example.exe    3个与射线查询的交叉点    最接近的点是:0.333333 0.333333 0.333333    平方距离:8.33333

以后的示例演示了一个棘手的问题,该问题显示在许多示例中:

   cd/usr/cgal-4.9/examples/snap_rounding_2/   cmake -dcgal_dir =/usr/cgal -4.9。    制作    目标snap_rounding的扫描依赖项    [16%]构建CXX对象Cmakefiles/snap_rounding.dir/snap_rounding.cpp.o    在/usr/cgal-4.9/include/cgal/core/coredefs.h:h:41:0中包含的文件中                     来自/usr/cgal-4.9/include/cgal/core/bigfloatrep.h:40,                     来自/usr/cgal-4.9/include/cgal/core/bigfloat.h:38,                     来自/usr/cgal-4.9/include/cgal/core_bigfloat.h:27,                     来自/USR/CGAL-4.9/include/cgal/core_arithmetic_kernel.h:39,                     来自/usr/cgal-4.9/include/cgal/arithmetic_kernel.h:51,                     来自/usr/cgal-4.9/include/cgal/arrational_function_traits_2.h:28,                     来自/usr/cgal-4.9/include/cgal/sweep_line_2_algorithms.h:37,                     来自/usr/cgal-4.9/include/cgal/snap_rounding_2.h:28,                     来自/usr/cgal-4.9/examples/snap_rounding_2/snap_rounding.cpp :::   /USR/cgal-4.9/include/cgal/core/core/extlong.h:171:8:警告:‘core :: extlong :: extlong :: extlong(int)’在使用dll链接引用后无需dllimport属性重新列出     inline extlong :: extlong(int i):val(i),flag(0){            ^   /USR/cgal-4.9/include/cgal/core/core/extlong.h:292:13:警告:‘bool core :: extlong :: isnan(isnan(isnan)const'无需dllimport属性重新列出了dll链接后重新列出了dll链接     inline bool extlong :: isnan()const {

这里省略了许多类似的错误。

谢谢!

作为您没有报告的错误,可能是由于错误导入指令所致,您可以尝试以下内容:

include/CGAL/export/helpers.h上更换

#  if defined(_WIN32) || defined(__CYGWIN__)
with
#  if defined(_WIN32)

然后用

构建
cmake -DWITH_CGAL_Qt5=OFF -DWITH_examples=ON

我看到的构建工作效果更好(20%在我们的工作中,仍在进行)