[英]Boost geometry intersection_inserter<polygon_2d> does not work
我正在使用升压几何库C ++。 该代码在旧版本的Eclipse(从pythonxy安装)中运行良好。 现在,我安装了最新版本的eclipse和Mingw(x86_64-w64-mingw32)。 错误出现在函数intersection_inserter()和boost :: geometry :: enrich_intersection_points()处。
typedef std::vector<polygon_2d > polygon_list;
polygon_list v;
intersection_inserter<polygon_2d>(square, *polygon_iterator,
std::back_inserter(v));
错误如下:
c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/
../../../../include/boost/geometry/algorithms/intersection.hpp:293:27:
required from 'OutputIterator boost::geometry::intersection_inserter(
const Geometry1&, const Geometry2&, OutputIterator) [with GeometryOut =
boost::geometry::polygon<boost::geometry::point_xy<double,
boost::geometry::cs::cartesian> >; Geometry1 =
boost::geometry::box<boost::geometry::point_xy<double,
boost::geometry::cs::cartesian> >; Geometry2 =
boost::geometry::polygon<boost::geometry::point_xy<double,
boost::geometry::cs::cartesian> >; OutputIterator =
std::back_insert_iterator<std::vector<boost::geometry::polygon<boost::
geometry::point_xy<double, boost::geometry::cs::cartesian> > > >]'
..\src\VoronoiPolygons.cpp:397:85: required from here
c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-
mingw32/4.7.1/../../../../include/boost/geometry/algorithms/overlay/
enrich_intersection_points.hpp:198:20: error: 'compare_distances' was not
declared in this scope, and no declarations were found by
argument-dependent lookup at the point of instantiation [-fpermissive]
当前未在提到的行上或整个文件中使用compare_distances
。 您是否正在使用(非常旧版本的)Boost?
可能是的,我建议升级。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.