Problems in compiling S.MENU

Clifton Wood cbwood at vt.edu
Fri Apr 24 13:06:05 EDT 1998


When compiling the latest Grass (4.2.1 v14) I get the following when
trying
to compile s.menu:


#################################################################
/export/home/benjy/cals/cliff/grass/src421/src/sites/s.menu/Lib
  make -f OBJ.solaris2.6/make.rules 

rm -f OBJ.solaris2.6/menu_hndlr.o
gcc -O2 -I/export/home/cbwood/emacs/include
-L/export/home/cbwood/emacs/lib -DBSD_COMP -I../Include
-I/export/home/benjy/cals/cliff/grass/src421/src/include  -c
menu_hndlr.c
menu_hndlr.c: In function `menu_handler':
menu_hndlr.c:16: subscripted value is neither array nor pointer
menu_hndlr.c:18: subscripted value is neither array nor pointer
menu_hndlr.c:20: subscripted value is neither array nor pointer
menu_hndlr.c:38: subscripted value is neither array nor pointer
menu_hndlr.c:39: subscripted value is neither array nor pointer
menu_hndlr.c:45: subscripted value is neither array nor pointer
menu_hndlr.c:46: subscripted value is neither array nor pointer
*** Error code 1
make: Fatal error: Command failed for target
`OBJ.solaris2.6/menu_hndlr.o'

-----------------------------------------------------------------

The problem in question stems from the definition of the variable
menu (of type MENU) which is defined as the following (from 
src/sites/s.menu/Include/menu.h):

typedef struct {char *text; int choice;} MENU[];

Now for as long as I've used GCC, I've *never* seen such a definition 
work. How can I fix this? Until then, I'm removing s.menu from my set of
commands and forging ahead (we just got new HDs so I'll be able to leave
the
Grass source tree online) and compile it later after I get some
responses.

Thanks in advance.

							- Cliff
-- 
============================================================
Clifton B. Wood
Programmer/Analyst for Virginia Tech's AGNIS Department
-------------------- Thought of the Day --------------------
windows95 = n.  32 bit extensions and a graphical shell for
a 16 bit patch to an 8 bit operating system originally coded
for a 4 bit microprocessor, written by a 2 bit company that 
can't stand 1 bit of competition.



More information about the grass-user mailing list