[GRASS5] trouble copiling 5.1

Glynn Clements glynn.clements at virgin.net
Thu Nov 28 10:45:05 EST 2002


Radim Blazek wrote:

> > 2) I don"t know how to fix this:
> >
> > OBJ.i686-pc-linux-gnu/query_postgr.o(.text+0x17d): In function
> > `query_postgr':
> > /home/mlennert/SRC/grass51/visualization/nviz/src/query_postgr.c:59:
> > undefined reference to `runInfxQry'
> > OBJ.i686-pc-linux-gnu/query_postgr.o(.text+0x2c8): In function
> > `query_pg_site':
> > /home/mlennert/SRC/grass51/visualization/nviz/src/query_postgr.c:102:
> > undefined reference to `runqry'
> > collect2: ld returned 1 exit status
> 
> I don't know.

runqry() is defined in runInfxQry.c; however, that file is only used
if the "doconfigure" script (visualization/nviz/doconfigure) sets it
up that way. Basically, there are two versions of query_postgr.c; a
version which actually uses Postgres (query_postgr_orig.c), and a stub
version (query_postgr_dummy.c). The doconfigure script copies one of
these to query_postgr.c. A similar situation exists for
panel_query.tcl.

Also, the whole of runInfxQry.c is conditionalised upon:

#if defined(HAVE_POSTGRES_H) || defined(HAVE_POSTGRES_FE_H)

Basically, the way in which NVIZ' Postgres support is handled is
something of a hack, and needs to be cleaned up.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list