[GRASS-dev] undefined reference to G_alloc_matrix()

Glynn Clements glynn at gclements.plus.com
Sat Aug 2 10:03:35 EDT 2008


Glynn Clements wrote:

> > I am trying to keep temporary files in DCELL **G_alloc_matrix(nrows,ncols)
> > 
> > on compilation I get an undefined reference to that function...
> > 
> > Checked in gis.h it is referring to gisdefs.h which has the definition.
> > I just svn up on trunk with full distclean and full recompile, still same.
> 
> Contrary to what you would naturally assume from the headers,
> G_alloc_matrix() is actually in the gmath library, so you need to add
> $(GMATHLIB) to LIBES.

I'm wondering whether those functions (matrix/vector alloc/free)
really belong in the gmath library. It can be quite a heavy
dependency, optionally requiring FFTW, BLAS and LAPACK.

The significance of this is that, if a user installs a binary GRASS
package, and they don't have FFTW (or their version of FFTW is
incompatible with the one used to build the gmath library), it won't
just be the handful of programs which need FFTW which fail to work.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list