[GRASS-windows] Compile la.c in Windows

Glynn Clements glynn at gclements.plus.com
Thu Dec 10 17:09:54 EST 2009


António Rocha wrote:

> I need to complie la.c (available in grass source code) in order to user 
> LAPACK/BLAS libs
> To do so, I saw that there is a makefile at \lib\gmath\ and I copied my 
> gmath folder to my GRASS installation lib folder (c:/grass6/lib/gmath) 
> in order to compile la.c
> 
> I used the following command:
> gcc -c c:/la.c -I c:/grass/include
> 
> But nothing happened. has anyone tried to compile la.c (from gmath) in 
> order to have access do LAPACK/BLAS libs in Windows? Or is it necessary 
> to firtst first install LAPACK/BLAS libs from their website?

You don't need to copy anything.

However, you do need to ensure that:

1. The macros HAVE_LIBLAPACK, HAVE_LIBBLAS and HAVE_G2C_H are defined
in <grass/config.h>, otherwise la.c will compile to an empty object
file (one which contains no code).

2. The variables LAPACKLIB and BLASLIB are defined in
include/Make/Platform.make.

3. You have the <g2c.h> header (which defines the fortran types in
terms of C types), and suitable versions of the BLAS and LAPACK
libraries (where "suitable" means that the implementations match the
prototypes in <grass/blas.h> and <grass/lapack.h>.

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


More information about the grass-windows mailing list