LAPACK on Windows
(Building LAPACK using the "native windows" (mingw) gfortran. ) Updated 13 April 2012
This applies to users of the "native Windows" gfortran who seek to create working LAPACK libraries from source. This procedure was developed and tested on on Windows XP and Windows 7 using using gcc-4.6.2.
The binary distribution of gfortran (presently) includes a version of the GNU make.exe , but certain instructions in the LAPACK makefiles may not properly execute. The make process for creating and testing the libraries may then fail completely, leaving the novice struggling, and the undetermined unfulfilled. In such case, DO NOT PANIC!, this article should help you with a "workaround" to create and test the LAPACK linear analysis libraries for your "native Windows" gfortran.
LAPACK is not a gcc project, but works with gfortran and is freely available from Netlib http://www.netlib.org/lapack/ . The gfortran "native Windows" (mingw) build is available as a binary [see GFortranBinaries#Windows ] and is presently provided with a courtesy versions of some minimum Mingw tools like make.exe.
Makefiles are textfiles which are scripts (programs) telling a "make" interpreter how to create a project, such as creating the LAPACK libraries and test routines [see http://en.wikipedia.org/wiki/Make_%28software%29 ]. LAPACK provides makefiles with their distribution, and these generally work fine under LINUX. Under DOS/Windows the same cannot always be said. Instruction in the LAPACK makefiles may fail, resulting in the make process failing to a dead stop at an early stage, generating errors and anguished hand-wringing.
By combining windows batch files with modified makefiles it is possible to bypass the lapack makefile problems and compile and test the lapack libraries. Using this approach it is not necessary to install a full Mingw or Cmake implementation.
Download and unzip the file provided below, which contains instructions, two modified LAPACK makefiles, a make.inc for gfortran, and two batch files. Follow the instructions.
Lapack 3.2.1 : LAPACK_gfortran_Win_7Nov2010.zip
Lapack 3.4.0 : LAPACK340_gfwin_13Apr2012.zip
Lapack 3.2.1 : LAPACK_gfortran_W32_20Jan08.zip
Lapack 3.2.1 : LAPACK_gfortran_Win_20June2010.zip