作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 boost 几何库 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 吗?
可能是的,我建议升级。
关于c++ - boost 几何 intersection_inserter<polygon_2d> 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13817282/
我正在尝试计算两个椭圆之间的重叠区域。我现在用多边形来近似椭圆,并且我找到了一个示例,该示例显然使用了旧版本的 Boost.Geometry,根据此 answer .来自这个 question 的第二
我正在使用 boost 几何库 C++。该代码在旧版本的 Eclipse(从 pythonxy 安装)中运行良好。现在我安装最新版本的 eclipse 和 Mingw (x86_64-w64-ming
我是一名优秀的程序员,十分优秀!