[GRASS5] Almost there...

Jeff D. Hamann jeff_hamann at hamanndonald.com
Fri Jan 31 20:21:12 EST 2003


Okay, I think I'm almost there...

I'm stuck on the following error (ignorance is such a drag and I've been
scouring the Gmakefile trying to get this resolved to no avail since there
doesn't seem to be a consistent way to generate a Gmakefile.

$ gmake5 -i src.contrib/OSU/v.example
  SRC     = /cygdrive/n/grass.src/grass5.0.1/src
  CMD     = /cygdrive/n/grass.src/grass5.0.1/src/CMD
  UNUSED  = /cygdrive/n/grass.src/grass5.0.1/unused
  HEADER  = head.i686-pc-cygwin
  ARCH    = i686-pc-cygwin
  GISBASE = /cygdrive/n/grass.src/grass5.0.1/dist.i686-pc-cygwin
  VERSION = 5.0.1 January 2003
#################################################################
/cygdrive/n/grass.src/grass5.0.1/src.contrib/OSU/v.example
  make -f OBJ.i686-pc-cygwin/make.rules

gcc -O -o v.example OBJ.i686-pc-cygwin/main.o OBJ.i686-pc-cygwin/interface.o
OBJ.i686-pc-cygwin/open_vect_in.o OBJ.i686-pc-cygwin/op
en_vect_out.o
OBJ.i686-pc-cygwin/process.o       -lgis   -lvect -ldig2 -ldig_atts -lgis   
-lvect -ldig2 -ldig_atts
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld:
cannot find -lgis
collect2: ld returned 1 exit status
make: *** [v.example] Error 1

Here's the Gmakefile I've "stolen" from the web as well
(http://www.geog.le.ac.uk/jwo/teaching/c_prog/14vector/index.html)

##############################################################
## A Gmakefile - This is necessary for all GRASS programs   ##
##     and links all necessary functions and      ##
##   libraries.        ##
##############################################################


PROG = v.example
#-----------^ Name of the GRASS module here.


LIBES = $(GISLIB) $(VASK) $(MATHLIB) $(VECTLIB) $(DIG_ATTLIB)
#-----------^ Library necessary for all GRASS programs.
#---------------------^ Parses keyboard input.
#------------------------------^ For non arithmetic maths.
#-----------------------------------------^ For any vector manipulation.
#----------------------------------------------------^ Vector attributes.


INCLUDES =\
  example.h
#-----------------^  Any include files go here.

COMPILE_FLAGS = -O
#---------------^ For optimising the code.


EXTRA_CFLAGS = $(VECT_INCLUDE)
#-------------------^ This call if vectors are ever used.


OBJ =\
 main.o  \
 interface.o \
 open_vect_in.o \
 open_vect_out.o \
 process.o
#----------^ These are the names of all seperate files that
#      the programmer creates. Must have ONE tab in
#      front of each line.

######### DEPENDENCIES #########

$(PROG): ${OBJ} ${LIBES}
  ${CC} $(COMPILE_FLAGS) -o $@ ${OBJ} ${LIBES} ${LIBES}


#
#-----^ This compiles the whole program bringing all labels together.

$(OBJ): ${INCLUDES}

$(LIBES): #
#---^ Ignore this line (used for future additions of the library).

When I run "$ gmake5 -i src.contrib/OSU/v.example" that's what I get....

I'm so close I can taste it, now...

Jeff.





More information about the grass-dev mailing list