[GRASSLIST:3666] Re: gmake5 in grass57

Daniel Isenegger disen at geo.unizh.ch
Tue Jun 15 08:19:25 EDT 2004


> Hamish schrieb:
>
>>> i successfully installed grass5.7, with the sources of 5.3 (after 
>>> working with grass 5.0.3) on a suse8.2.
>>> Now i tried to run own code with grass5.7  as i did with in 5.0.3
>>> using the gmake5 for compiling,
>>> but i cannot find a similar gmake5-file (as in 5.0.3) for the
>>> grass5.7.
>>>
>>> My questions are now:
>>> - Does i have to install grass5.3 for working with own code addressing
>>> tools in grass5.7
>>>   
>>
>>
>> you only need 5.3 for the make 'mix step' .. after that you don't need
>> it anymore.
>>
>>
>>  
>>
>>> - how can i get a appropriate gmake5 for grass5.7?
>>>   
>>
>>
>>
>> use 'make' instead; copy a Makefile from another similar module & modify
>> to suit.
>>
>>
>>
>> Hamish
>>  
>
Hi
i renamed the Gmakefile to Makefile (cause i got no other Makefile):

CC=g++
# include of dirs, e.g.gis.h is in ...
CFLAGS=-g -Wall
EXTRA_CFLAGS=-I 
/data/gis/nfp48/nfp48/ipodlas0.1/grass/grass57/grass57/include

# including of libs: e.g. D_ are in DISPLAYLIB
# order of libs: important -> DISPLAYLIB before RASTERLIB before GISLIB,etc
LIBES=$(DISPLAYLIB) $(RASTERLIB) $(IMAGERYLIB) $(VASKLIB) \
   $(GISLIB) $(DATETIMELIB) $(CURSES) $(XDRLIB) $(MATHLIB) $(SEGMENTLIB)
DEPLIBES=$(DEPIMAGERYLIB) $(DEPGISLIB) $(DEPVASKLIB) $(DEPVASK)

OBJ=main.cc plotRasterMap.cc

all: plotRasterMap

#with -g: gdb enabling option
plotRasterMap: $(OBJ) $(LIBES) $(DEPLIBS)
   $(CC) $(LDFLAGS) -g -o $@ $(OBJ) $(LIBES) $(DEPLIBES) 
$(LIST): global.h
$(LIBES): #in case of library change;i.e.they must be here,
$(DEPLIBS):


# to clean up
.PHONY: clean
clean:
   rm *.o *~ ~* *@ \#*


and get errors now starting with:
... undefined reference to `G_gisinit'
...
(going on with similar errors concerning G_ and R_ functions)

I guess this means either a library is missing or the order is wrong in 
LIBES, but i cannot figure out what.

Thanks dani





More information about the grass-user mailing list