#include <CGAL/IO/reader_helpers.h> 导致错误 C2039: 'Point_3': is not a member of 'CGAL'

时间:2021-03-17 12:59:21

标签: c++ windows cgal

我目前遇到的问题是,如果我在我的程序中包含(尚未在代码中的任何地方使用它),我会遇到一些构建错误:

1>C:\dev\CGAL-5.0.2\include\CGAL/IO/reader_helpers.h(61,71): error C2039: 'Point_3': is not a member of 'CGAL'
1>C:\dev\CGAL-5.0.2\include\CGAL/IO/reader_helpers.h(21): message : see declaration of 'CGAL'
1>C:\dev\CGAL-5.0.2\include\CGAL/IO/reader_helpers.h(61,1): error C2061: syntax error: identifier 'Point_3'

我实际上想包括 ,但包括

有人知道这是什么问题吗?

谢谢!

丹尼尔

1 个答案:

答案 0 :(得分:0)

IO 包有不少变化;该标题已重命名,我正在尝试使用新版本 (5.2.1) 运行

https://www.cgal.org/2021/03/17/cgal521/

见:

commit 37b5928df2b4e80c09cf2cb94361827221a649a1
Author: Maxime Gimeno <maxime.gimeno@gmail.com>
Date:   Tue Dec 1 11:33:35 2020 +0100

    Fixes of warnings and errors

diff --git a/Stream_support/include/CGAL/IO/helpers.h b/Stream_support/include/CGAL/IO/helpers.h
index f261337bac..ead5a86c45 100644
--- a/Stream_support/include/CGAL/IO/helpers.h
+++ b/Stream_support/include/CGAL/IO/helpers.h
@@ -30,7 +30,8 @@ namespace internal {
 template <typename Kernel>
 void fill_point(const double x, const double y, const double z, const double w, CGAL::Point_3<Kernel>& pt)
 {
-  pt = CGAL::Point_3<Kernel>(x, y, z, w);
+  typedef typename Kernel::FT FT;
+  pt = CGAL::Point_3<Kernel>(FT(x/w), FT(y/w), FT(z/w));
 }
 
 template <typename Point_3>