[geos-devel] GEOS 2.1.1 sprintf Compile Error

Frank Warmerdam fwarmerdam at gmail.com
Fri Jan 28 13:47:29 EST 2005


On Fri, 28 Jan 2005 10:56:35 +0100, strk at refractions.net
<strk at refractions.net> wrote:
> I've substituted most sprintf calls with use of ostringstream.
> WKTWriter and (external) MarkupSTL are the only one left.
> 
> Could you check if CVS version works fine for you ?
> TIA

Strk,

OK, I don't get the sprintf() problems anymore, though I do 
falldown with this message:


/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I.
-I../../source/headers -I../../source/headers/geos
-I../../source/headers -DGEOS_VERSION=""2.1.1""    -g -O2 -c -o
Polygonizer.lo `test -f '../operation/polygonize/Polygonizer.cpp' ||
echo './'`../operation/polygonize/Polygonizer.cpp
 g++ -DHAVE_CONFIG_H -I. -I. -I../../source/headers
-I../../source/headers/geos -I../../source/headers
-DGEOS_VERSION=2.1.1 -g -O2 -c ../operation/polygonize/Polygonizer.cpp
-Wp,-MD,.deps/Polygonizer.TPlo  -fPIC -DPIC -o .libs/Polygonizer.o
../operation/polygonize/Polygonizer.cpp: In method `void
geos::Polygonizer::LineStringAdder::filter_rw(geos::Geometry *)':
../../source/headers/geos/opPolygonize.h:408: `void
geos::Polygonizer::add(geos::LineString *)' is private
../operation/polygonize/Polygonizer.cpp:29: within this context
make[2]: *** [Polygonizer.lo] Error 1
make[2]: Leaving directory `/usr3/pkg4/OpenEV_FW_Tree/geos-050128/source/geom'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr3/pkg4/OpenEV_FW_Tree/geos-050128/source'
make: *** [all-recursive] Error 1

This turns out to be a class defined within the namespace of
the Polygonizer class not having access to the Polygonizer
private data.  Since it works with modern GCCs and not with
the ancient gcc, I would conclude that the problem is really
a bug in the old GCC, so I don't think it makes sense to 
bastardize geos to be compatible.  

Of course, in the dark conservative recesses of my own twisted
mind, the voice that says "don't use advanced C++ features ... 
they will give you a headache eventually" says "ha!  I told you
so.". 

For now I'll level GEOS out of my FWTools builds, but eventually
I'll just have to upgrade to a modern GCC. 

Best regards, 
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the geos-devel mailing list