2012-12-11 3 views
0

부스트 지오메트리 라이브러리 C++을 사용하고 있습니다. 이 코드는 이전 버전의 Eclipse (pythonxy에서 설치)에서 잘 작동합니다. 이제 Eclipse와 Mingw (x86_64-w64-mingw32)의 최신 버전을 설치합니다. 오류는 intersection_inserter() 및 boost :: geometry :: enrich_intersection_points() 함수에 나타납니다.부스트 지형 intersection_inserter <polygon_2d>이 작동하지 않습니다.

 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] 

답변

1

compare_distances는 현재 언급 한 줄에 사용하거나 전체 파일에 있지 않습니다. Boost의 (아주) 이전 버전을 사용하고 있습니까?

아마도 예, 업그레이드하라는 조언.

+0

코드는 이전 버전의 부스트, 부스트 기하 도형 라이브러리를 기반으로 작성되었습니다. 하지만 이제는 Boost의 최신 버전을 다운로드합니다. 이것이 이유라고 생각합니까? 그렇다면 새로운 버전의 부스트를 기반으로 프로그램을 다시 작성해야한다는 의미입니까? 예, 나는 부스트 라이브러리를 비교했습니다. 최신 버전에서는 일부 파일이 삭제됩니다. – Jun

+0

릴리스 이후 인터페이스가 실제로 변경되지 않았습니다. 그러나 시험판 (GGL 또는 샌드 박스 또는 트렁크)을 사용한 경우 변경 사항이 더 많을 수 있습니다. 그러나 "재 작성"은 필요하지 않습니다. 귀하의 코드를 기반으로 나는 그 영향을 볼 수 없습니다. –

관련 문제