[GRASS5] r.flow: strange compile error M_PI
Brad Douglas
rez at touchofmadness.com
Wed Jun 22 22:04:55 EDT 2005
On Thu, 2005-06-23 at 00:12 +0200, Markus Neteler wrote:
> Hi,
>
> after an update of the Linux OS, I am no longer able to
> compile r.flow:
>
> thuille:r.flow[281.25] make
> gcc -I/hardmnt/thuille0/ssi/software/cvsgrass61/include -I/hardmnt/thuille0/ssi/software/cvsgrass61/dist.i686-pc-linux-gnu/include/grass -g -Wall -ansi -Wall -Wconversion -Wno-implicit-int -I/usr/local/include -DPACKAGE=\""grassmods"\" -I/hardmnt/thuille0/ssi/software/cvsgrass61/include -I/hardmnt/thuille0/ssi/software/cvsgrass61/dist.i686-pc-linux-gnu/include/grass \
> -o OBJ.i686-pc-linux-gnu/aspect.o -c aspect.c
> aspect.c: In function `aspect_fly':
> aspect.c:50: error: `M_PI' undeclared (first use in this function)
> aspect.c:50: error: (Each undeclared identifier is reported only once
> aspect.c:50: error: for each function it appears in.)
> make: *** [OBJ.i686-pc-linux-gnu/aspect.o] Error 1
>
> thuille:r.flow[282.26] cat /etc/issue
> Red Hat Enterprise Linux WS release 4 (Nahant Update 1)
> Kernel \r on an \m
>
> It should be in math.h, right?
> How to debug such things?
Yes, it should be in <math.h>, but it's not defined on all systems. I
don't understand it being missing from your system, either.
Generally, I add the following to the source that uses it:
#ifndef M_PI
#define M_PI 3.14...
#endif
--
Brad Douglas <rez at touchofmadness.com>
More information about the grass-dev
mailing list