joto / osmium

C++/Javascript framework for working with OSM files.
http://wiki.openstreetmap.org/wiki/Osmium
GNU General Public License v3.0
123 stars 31 forks source link

Compile error: cannot convert from base ‘geos::geom::Geometry’ #47

Closed christoph-buente closed 12 years ago

christoph-buente commented 12 years ago

While trying to compile the latest osmium code, the compiler throws up the following error:

[~/Projects/osmium/osmjs (master)] ➔ make g++ -g -Wall -Wextra -Wredundant-decls -Wdisabled-optimization -pedantic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DOSMIUM_WITH_GEOS -I/usr/local/Cellar/geos/3.3.3/include -DOSMIUM_WITH_SHPLIB -DOSMIUM_WITH_JAVASCRIPT -I../include -o osmjs osmjs.cpp -L/usr/local/lib -lexpat -lpthread -L/usr/local/Cellar/geos/3.3.3/lib -lgeos -lz -lprotobuf-lite -losmpbf -lv8 -licuuc -lshp In file included from /usr/local/Cellar/geos/3.3.3/include/geos/geom/GeometryFactory.h:26, from ../include/osmium/geometry_factory.hpp:4, from ../include/osmium.hpp:109, from osmjs.cpp:26: /usr/local/Cellar/geos/3.3.3/include/geos/geom/MultiPoint.h: In copy constructor ‘geos::geom::MultiPoint::MultiPoint(const geos::geom::MultiPoint&)’: /usr/local/Cellar/geos/3.3.3/include/geos/geom/MultiPoint.h:112: warning: base class ‘class geos::geom::Puntal’ should be explicitly initialized in the copy constructor In file included from ../include/osmium.hpp:118, from osmjs.cpp:26: ../include/osmium/geometry/multipolygon.hpp: In member function ‘v8::Handlev8::Value Osmium::Geometry::MultiPolygon::js_to_array(const v8::Arguments&)’: ../include/osmium/geometry/multipolygon.hpp:168: error: cannot convert from base ‘geos::geom::Geometry’ to derived type ‘geos::geom::Polygon’ via virtual base ‘geos::geom::Geometry’ make: *\ [osmjs] Error 1

==> Build Environment CPU: 8-core 64-bit sandybridge MacOS: 10.7.3-x86_64 Xcode: 4.3.2 CC: /usr/bin/clang CXX: /usr/bin/clang++ => /usr/bin/clang LD: /usr/bin/clang CFLAGS: -Os -w -pipe -march=native -Qunused-arguments CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments CPPFLAGS: -I/usr/local/Cellar/icu4c/4.8.1.1/include LDFLAGS: -L/usr/local/Cellar/icu4c/4.8.1.1/lib MAKEFLAGS: -j8 PKG_CONFIG_PATH: /usr/local/Cellar/icu4c/4.8.1.1/lib/pkgconfig

joto commented 12 years ago

Fixed in 6d7a52e61105b224255dd57b6c9af9807293a562