[Qgis-developer] Compiling against geos-3.0.0rc4

Mike Leahy mgleahy at alumni.uwaterloo.ca
Mon Feb 19 15:47:46 EST 2007


Tom,

That did the trick.  QGis 0.8.0 compiles/runs fine now.  Should this be
mentioned on the geos develper list as a bug then?

I was also able to compile the svn source for QGis too, but I still have
problems with the destination libdir (cmake keeps installing to
/usr/lib, rather than /usr/lib64 as it should in my case).  I'm sure
this can be fixed somehow with the cmake configuration, but I can't seem
to figure it out.  Anyone have experience with this?

Thanks for the help,
Mike

Tom Elwertowski wrote:
> 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