G_window_overlap not in libgis???

Did anyone ever figure out what's going on with G_window_overlap?
I did a bad thing and recompiled a GRASS lib (I was trying to add -g
so that I could figure out some things with xdbx).

I'm trying to compile something:

cc -o s.voronoi OBJ.sun4/[bunch of dot-oh files] \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libgis.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libvect.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libdig2.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libdig_atts.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libdisplay.a -lm
ld: Undefined symbol
   _G_window_overlap

So, I check the library

% ar t /home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libgis.a \
  | grep overlap
wind_overlap.o

seems to be there. Now I check the source:

% grep G_window_overlap \
  /home/soils/g/aggrass/grass4.1/src/libes/gis/wind_overlap.c
G_window_overlap (window, N, S, E, W)

yep, this function *should* be in libgis.a

So, what's going on here?!? I'm recompiled several times (undoing
my -g addition), ran ranlib, etc, all to no avail.

Checking the archives, I see that people have run into this problem
before. Was the solution ever identified and applied?

I have Update 3 installed. This is on a sun4 (4.1.1) using Sun's ld.

Thanks,
--Darrell

Date: Tue, 6 Oct 1992 11:29:18 MDT
From: ront@niwot.CFNR.ColoState.EDU (Ronald E. Thomas)
Subject: SCS tools

cc -s -o /files/grass4/etc/bin/contrib/cmd/v.report OBJ.sun386/main.o OBJ.sun386
/format.o OBJ.sun386/header.o OBJ.sun386/label.o OBJ.sun386/parse.o OBJ.sun386/
prt_report.o OBJ.sun386/do_v_stats.o OBJ.sun386/prt_unit.o OBJ.sun386/
perimeter.o OBJ.sun386/report.o OBJ.sun386/stats.o OBJ.sun386/sums.o
/data/grass.scripts/src/libes/LIB.sun386/libgis.a /data/grass.scripts/src/libes
/LIB.sun386/libvect.a /data/grass.scripts/src/libes/LIB.sun386/libdig2.a -lm
ld: Undefined symbol
   G_window_overlap
--------------------------------------------------------------------------
From: nsmith@polar.bowdoin.edu (Neel Smith)
Subject: 4.1 on alpha
Date: Mon, 25 Oct 1993 13:50:48 (EDT)

I'm porting GRASS 4.1 to DEC alpha hardware using gcc for my compiler.
Has anyone else done this?

Specifically, at a first glance it looks like the functions G_window_overlap
and G_window_percentage_overlap are defined in src/libes/gis/wind_overlap.c
but are not declared extern anywhere -- a bunch of vector routines
that call them can't find them. Should they be declared in gisdefs.h?

Thanks for any help -- gcc is a lot stricter than the old DEC compilers,
and before I wade through all the information it spits out, I'd like to
know if someone has already done it.
--------------------------------------------------------------------------
From: Martin Ameskamp <ma@informatik.uni-kiel.d400.de>
Subject: Grass function declarations

Specifically, at a first glance it looks like the functions G_window_overlap
and G_window_percentage_overlap are defined in src/libes/gis/wind_overlap.c
but are not declared extern anywhere -- a bunch of vector routines
that call them can't find them. Should they be declared in gisdefs.h?

  I have extracted all the function declarations for the GIS, Raster,
  Vector and Display libraries and collected them in one file
  (most of them, anyway - might have missed one or two) because
  I'm using GRASS from C++ (gcc-2.3.3 to be exact) and C++ is even more
  strict about prototypes than gcc.
--------------------------------------------------------------------------

It seems that the solution here is to be sure that libgis.a
is linked last (it's one of the vector libraries that calls
G_window_overlap, not my program). Perhaps this little
tidbit of info should find its way into the programmers
manual (if it's there, I didn't find it). Maybe a clarification
in \S13.9 (Loading the Vector Library).

Darrell McCauley (mccauley@ecn.purdue.edu) writes on 2 Jan 94:

Did anyone ever figure out what's going on with G_window_overlap?
I did a bad thing and recompiled a GRASS lib (I was trying to add -g
so that I could figure out some things with xdbx).

I'm trying to compile something:

cc -o s.voronoi OBJ.sun4/[bunch of dot-oh files] \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libgis.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libvect.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libdig2.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libdig_atts.a \
/home/soils/g/aggrass/grass4.1/src/libes/LIB.sun4/libdisplay.a -lm
ld: Undefined symbol
  _G_window_overlap