繁体   English   中英

无法编译CGAL代码

[英]Can't compile CGAL code

我无法从CGAL文档编译此代码,得到以下错误:

$ g++ apply.cpp -lCGAL -I/usr/local/include -o a.out
In file included from /usr/include/CGAL/Constrained_triangulation_2.h:28:0,
                 from /usr/include/CGAL/Constrained_Delaunay_triangulation_2.h:25,
                 from apply.cpp:3:
/usr/include/CGAL/Triangulation_2.h: In instantiation of ‘class CGAL::Triangulation_2<CGAL::Epeck, CGAL::Default>’:
/usr/include/CGAL/Constrained_triangulation_2.h:47:7:   required from ‘class CGAL::Constrained_triangulation_2<CGAL::Epeck, CGAL::Default, CGAL::Exact_intersections_tag>’
/usr/include/CGAL/Constrained_Delaunay_triangulation_2.h:63:7:   required from ‘class CGAL::Constrained_Delaunay_triangulation_2<CGAL::Epeck, CGAL::Default, CGAL::Exact_intersections_tag>’
/usr/include/CGAL/Constrained_triangulation_plus_2.h:64:7:   required from ‘class CGAL::Constrained_triangulation_plus_2<CGAL::Constrained_Delaunay_triangulation_2<CGAL::Epeck, CGAL::Default, CGAL::Exact_intersections_tag> >’
apply.cpp:12:16:   required from here
/usr/include/CGAL/Triangulation_2.h:100:48: error: no type named ‘size_type’ in ‘struct CGAL::Default’

我从apt安装了libcgal-dev,libcgal-demo,g ++和cmake。 G ++版本5.4.0-6ubuntu1~16.04.9

C / C ++不清楚版本错误,这个代码示例来自CGAL 4.12,我的库是4.7。

我不得不将我的linux升级到18.04以便以稳定的方式获得最近的libboost版本,然后我使用官方存储库中的libcgal 4.11来减少开销编译和维护库。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM