[GRASS-dev] d.graph compilation

Hello,

d.graph is bugging on compilation:

root@siduxbox:/home/yann/tmp/grass/display/d.graph# make
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p OBJ.x86_64-unknown-linux-gnu
gcc -I/home/yann/tmp/grass/dist.x86_64-unknown-linux-gnu/include -g
-O2 -DPACKAGE=\""grassmods"\"
-I/home/yann/tmp/grass/dist.x86_64-unknown-linux-gnu/include -o
OBJ.x86_64-unknown-linux-gnu/do_graph.o -c do_graph.c
do_graph.c:25: error: static declaration of 't' follows non-static declaration
options.h:4: error: previous declaration of 't' was here
do_graph.c:25: error: static declaration of 'b' follows non-static declaration
options.h:4: error: previous declaration of 'b' was here
do_graph.c:25: error: static declaration of 'l' follows non-static declaration
options.h:4: error: previous declaration of 'l' was here
do_graph.c:25: error: static declaration of 'r' follows non-static declaration
options.h:4: error: previous declaration of 'r' was here
make: *** [OBJ.x86_64-unknown-linux-gnu/do_graph.o] Error 1

Thanks,
Yann

--
Yann Chemin
International Rice Research Institute
Office: http://www.irri.org/gis
Perso: http://www.freewebs.com/ychemin

Yann Chemin wrote:

d.graph is bugging on compilation:

root@siduxbox:/home/yann/tmp/grass/display/d.graph# make
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p OBJ.x86_64-unknown-linux-gnu
gcc -I/home/yann/tmp/grass/dist.x86_64-unknown-linux-gnu/include -g
-O2 -DPACKAGE=\""grassmods"\"
-I/home/yann/tmp/grass/dist.x86_64-unknown-linux-gnu/include -o
OBJ.x86_64-unknown-linux-gnu/do_graph.o -c do_graph.c
do_graph.c:25: error: static declaration of 't' follows non-static declaration
options.h:4: error: previous declaration of 't' was here

Fixed in SVN, with:

--- display/d.graph/options.h (revision 33095)
+++ display/d.graph/options.h (working copy)
@@ -1,6 +1,5 @@

extern float hsize;
extern float vsize;
-extern double t, b, l, r;
extern int mapunits;
extern FILE *infile;

It compiled without warnings for me; probably a difference between gcc
3.4.x and 4.x.

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

It is ok now,
Thanks Glynn,
Yann

2008/8/27 Glynn Clements <glynn@gclements.plus.com>:

Yann Chemin wrote:

d.graph is bugging on compilation:

root@siduxbox:/home/yann/tmp/grass/display/d.graph# make
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p OBJ.x86_64-unknown-linux-gnu
gcc -I/home/yann/tmp/grass/dist.x86_64-unknown-linux-gnu/include -g
-O2 -DPACKAGE=\""grassmods"\"
-I/home/yann/tmp/grass/dist.x86_64-unknown-linux-gnu/include -o
OBJ.x86_64-unknown-linux-gnu/do_graph.o -c do_graph.c
do_graph.c:25: error: static declaration of 't' follows non-static declaration
options.h:4: error: previous declaration of 't' was here

Fixed in SVN, with:

--- display/d.graph/options.h (revision 33095)
+++ display/d.graph/options.h (working copy)
@@ -1,6 +1,5 @@

extern float hsize;
extern float vsize;
-extern double t, b, l, r;
extern int mapunits;
extern FILE *infile;

It compiled without warnings for me; probably a difference between gcc
3.4.x and 4.x.

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

--
Yann Chemin
International Rice Research Institute
Office: http://www.irri.org/gis
Perso: http://www.freewebs.com/ychemin