C++ 无法在Cygwin中生成CGAL示例

C++ 无法在Cygwin中生成CGAL示例,c++,windows,cygwin,cgal,C++,Windows,Cygwin,Cgal,我无法在Cygwin下构建一些CGAL示例。所有失败的示例都共享类似的错误消息 任何指导都将不胜感激 以下是我遵循的步骤和“make”的示例错误 安装在Windows 7下的Cygwin(x64)到d:\cygwin64 CGAL源代码下载自 并解压缩到D:\cygwin64\usr\CGAL-4.9 CGAL所需的所有库都是通过Cygwin x64安装程序安装的 初始cmake: cd /usr/CGAL-4.9 cmake -DCMAKE_LEGACY_CYGWIN_WIN32=1

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

任何指导都将不胜感激

以下是我遵循的步骤和“make”的示例错误

安装在Windows 7下的Cygwin(x64)到d:\cygwin64

CGAL源代码下载自 并解压缩到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 . cd/usr/CGAL-4.9 cmake-DCMAKE\u LEGACY\u CYGWIN\u WIN32=1-DWITH\u CGAL\u Qt5=OFF-DWITH\u examples=ON。 一些示例无法配置,其中包括网格和缩放空间重构3个示例

cd /usr/CGAL-4.9 make make examples cd/usr/CGAL-4.9 制作 举例 成功创建了前几个示例。比如说,

PATH=/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 intersections(s) with ray query closest point is: 0.333333 0.333333 0.333333 squared distance: 8.33333 PATH=/usr/local/bin:/usr/bin:/bin:/lib:/usr/CGAL-4.9/bin:/usr/CGAL-4.9/lib cd/usr/CGAL-4.9/examples/AABB_树 ./AABB_triangle_3_example.exe 3个具有光线查询的交点 最近点为:0.333 0.333 0.333 平方距离:8.33333 后面的一个示例演示了一个唠叨的问题,该问题出现在许多示例中:

cd /usr/CGAL-4.9/examples/Snap_rounding_2/ cmake -DCGAL_DIR=/usr/CGAL-4.9 . make Scanning dependencies of target snap_rounding [ 16%] Building CXX object CMakeFiles/snap_rounding.dir/snap_rounding.cpp.o In file included from /usr/CGAL-4.9/include/CGAL/CORE/CoreDefs.h:41:0, from /usr/CGAL-4.9/include/CGAL/CORE/BigFloatRep.h:40, from /usr/CGAL-4.9/include/CGAL/CORE/BigFloat.h:38, from /usr/CGAL-4.9/include/CGAL/CORE_BigFloat.h:27, from /usr/CGAL-4.9/include/CGAL/CORE_arithmetic_kernel.h:39, from /usr/CGAL-4.9/include/CGAL/Arithmetic_kernel.h:51, from /usr/CGAL-4.9/include/CGAL/Arr_rational_function_traits_2.h:28, from /usr/CGAL-4.9/include/CGAL/Sweep_line_2_algorithms.h:37, from /usr/CGAL-4.9/include/CGAL/Snap_rounding_2.h:28, from /usr/CGAL-4.9/examples/Snap_rounding_2/snap_rounding.cpp: : /usr/CGAL-4.9/include/CGAL/CORE/extLong.h:171:8: warning: ‘CORE::extLong::extLong(int)’ redeclared without dllimport attribute after being referenced with dll linkage inline extLong::extLong(int i) : val(i), flag(0) { ^ /usr/CGAL-4.9/include/CGAL/CORE/extLong.h:292:13: warning: ‘bool CORE::extLong::isNaN() const’ redeclared without dllimport attribute after being referenced with dll linkage inline bool extLong::isNaN() const { cd/usr/CGAL-4.9/examples/Snap\u rounding\u 2/ cmake-DCGAL_DIR=/usr/CGAL-4.9。 制作 目标捕捉舍入的扫描相关性 [16%]构建CXX对象CMakeFiles/snap_rounding.dir/snap_rounding.cpp.o 在/usr/CGAL-4.9/include/CGAL/CORE/corefs.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_算术_kernel.h:39, 从/usr/CGAL-4.9/include/CGAL/算术内核.h:51, 从/usr/CGAL-4.9/include/CGAL/Arr\u rational\u function\u traits\u 2.h:28, 来自/usr/CGAL-4.9/include/CGAL/Sweep_line_2_algorithms.h:37, 从/usr/CGAL-4.9/include/CGAL/Snap_舍入_2.h:28, 来自/usr/CGAL-4.9/examples/Snap_rounding_2/Snap_rounding.cpp:: /usr/CGAL-4.9/include/CGAL/CORE/extLong.h:171:8:警告:“CORE::extLong::extLong(int)”在使用dll链接引用后重新声明,但不带dllimport属性 内联extLong::extLong(inti):val(i),标志(0){ ^ /usr/CGAL-4.9/include/CGAL/CORE/extLong.h:292:13:警告:“bool-CORE::extLong::isNaN()const”在使用dll链接引用后重新声明,但没有dllimport属性 内联bool extLong::isNaN()常量{ 这里省略了许多类似的错误


谢谢!!!

由于您没有报告的错误可能是由于错误的导入指令造成的,您可以尝试以下操作:

include/CGAL/export/helpers.h
替换

然后用

cmake -DWITH_CGAL_Qt5=OFF -DWITH_examples=ON

就我所见,构建的效果要好得多(20%在我们的一个系统中完成,并且仍在运行)

您所显示的只是一个警告,没有错误。。。
cmake -DWITH_CGAL_Qt5=OFF -DWITH_examples=ON