[GRASS5] Using 'vask' library

Aleksey Naumov naumov at acsu.buffalo.edu
Mon Feb 11 18:39:42 EST 2002


Hi GRASS developers,

I have to compile a program that runs under grass using, among other things, 
the 'vask' library. It compiles, but gives the following error when run:

GRASS:~ > swatgrass
'xterm-xfree86': unknown terminal type.
Error opening terminal: xterm-xfree86.
GRASS:~ >

I've determined that this message is generated when V_call() is called.
Curiously, when I run the program in gdb, it runs ok and the screen menus are 
displayed just fine!

I thought maybe the problem has to do with how I linked in the termcap 
library. Programmer's manual suggests using $(VASK), because "it specifies 
both the UNIX curses and termcap libraries as well as $(VASKLIB)" (p. 286), 
however, $(VASK) is not set when I ran 'gmake5' on the GMakefile (see below). 
So I just plugged the libraries directly:
	$(CC) $(LDFLAGS) -o $@ $(LIST) -ltermcap -lcurses $(LIBES)

Below is the whole GMakefile. I'd be very glad to hear any ideas...

Thank you,

Aleksey



-------------- GMakefile --------------------------------
LIBES  = $(D_LIB) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(VASKLIB) $(MATHLIB)  
$(DATETIMELIB) $(ZLIB)


#EXTRA_CFLAGS = -DDEBUG -DBOBMGT -DLB_LUSE_SOIL -DHUMUS -DVERELMGT -DQUAL2E 
-L/usr/lib


PGM = swatgrs

LIST = \
	dummy_lcra.o\
	... more object files here ...
        main.o

./$(PGM): $(LIST) $(LIBES)
		@echo VASK = $(VASK)
		@echo VASKLIB = $(VASKLIB)
		@echo DATETIMELIB = $(DATETIMELIB)
		@echo ZLIB = $(ZLIB)
		@echo
		$(CC) $(LDFLAGS) -o $@ $(LIST) -ltermcap -lcurses $(LIBES)

$(LIBES): #



More information about the grass-dev mailing list