[Qgis-developer] Compiling against geos-3.0.0rc4
Tom Elwertowski
telwertowski at comcast.net
Thu Feb 15 23:35:40 EST 2007
Mike Leahy wrote:
> /home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
> reference to `geos::geom::Coordinate::Coordinate(double, double, double)'
> /home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
> reference to `geos::io::WKTReader::~WKTReader()'
> /home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
> reference to `geos::io::WKTReader::WKTReader(geos::geom::GeometryFactory
> const*)'
> /home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
> reference to `geos::geom::Coordinate::~Coordinate()'
There is a change between GEOS 3.0.0rc3 and rc4 that requires either an
edit to GEOS or a new compile flag to QGIS in order to compile.
I made the following edit to rc4 in order to provide the missing
routines to QGIS. Change line 30 of source/inlines.cpp from
#if defined(__MINGW32__) && !defined(DLL_EXPORT)
to
#if !defined(__MINGW32__) || defined(__MINGW32__) && !defined(DLL_EXPORT)
Some routines, including four that QGIS needs, can be defined either
inline or linked from the GEOS library. If you define GEOS_INLINE for
QGIS, the functions will be defined inline and you won't need external
copies of these routines.
A MINGW user was getting doubly defined errors when using GEOS_INLINE
and therefore submitted a patch which removes the library routines. The
patch was probably intended for MINGW only but actually affects all
platforms. I'm surprised no one else has noticed. Perhaps everyone is
defining GEOS_INLINE.
Tom
More information about the Qgis-developer
mailing list