[geos-devel] GEOS 2.1.1 sprintf Compile Error

strk at refractions.net strk at refractions.net
Fri Jan 28 02:39:05 EST 2005


On Fri, Jan 28, 2005 at 12:07:22AM -0500, Frank Warmerdam wrote:
> Folks,
> 
> I get the following error building geos 2.1.1 with gcc 2.95.4:
> 
> /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 QuadTreeNodeBase.lo `test -f 
> '../index/quadtree/QuadTreeNodeBase.cpp' || echo 
> './'`../index/quadtree/QuadTreeNodeBase.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 ../index/quadtree/QuadTreeNodeBase.cpp 
> -Wp,-MD,.deps/QuadTreeNodeBase.TPlo  -fPIC -DPIC -o .libs/QuadTreeNodeBase.o
> ../index/quadtree/QuadTreeNodeBase.cpp: In method `class string 
> geos::QuadTreeNodeBase::toString() const':
> ../index/quadtree/QuadTreeNodeBase.cpp:149: implicit declaration of 
> function `int geos::sprintf(...)'
> 
> I can work around it by include <stdio.h> at the top of the file.  Are there
> any objections to my committing such a change?  I'm not sure if there is any
> bad karma in doing so, or if we ought to just replace sprintf() with 
> something
> more modern.
> 
> Actually, there are a couple other files I ran into with the same problem.
> 
> Best regards,

Frank, there are 22 files using sprintf.
I think they should be replaced with something more modern.

--strk;

> -- 
> ---------------------------------------+--------------------------------------
> 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
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel



More information about the geos-devel mailing list