[GRASS-dev] Modules

Glynn Clements glynn at gclements.plus.com
Thu Feb 22 11:12:44 EST 2007


Paul Kelly wrote:

> > The next bit is somewhat more radical, so I haven't committed it to
> > CVS yet.
> >
> > The attached patch completely eliminates the use of the raster library
> > and display drivers by v.digit, in favour of a Tk canvas widget. The
> > patch needs to be applied from within the v.digit directory.
> >
> > Testing and comments would be appreciated.
> 
> On Windows I get the following compile error:
> 
> gcc -I/c/grass/grass6/dist.i686-pc-mingw32/include -I/c/grass/forgrass/include -
> g -O2  -I/c/grass/forgrass/include   -I/c/tcl/include -I/c/tcl/include -I/c/gras
> s/forgrass/include     -DPACKAGE=\""grassmods"\"  -I/c/grass/grass6/dist.i686-pc
> -mingw32/include \
>          -o OBJ.i686-pc-mingw32/driver.o -c driver.c
> driver.c:22: error: conflicting types for 'round'
> c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h:707: error: pre
> vious declaration of 'round' was here
> driver.c:22: error: conflicting types for 'round'
> c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/math.h:707: error: pre
> vious declaration of 'round' was here
> make: *** [OBJ.i686-pc-mingw32/driver.o] Error 1

I'll replace the round() function with a macro:

	#define round(x) ((int) floor(0.5 + (x)))

I can't just use the system's round(), as it's C99.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list