OONumerics User : |
From: Gabriel M. Beddingfield (gabriel_at_[hidden])
Date: 2005-01-25 21:39:46
Quoting John Adamson <john.adamson_at_[hidden]>:
> I am trying to link a C++ program to LAPACK but I have not been successful.
> I understand how to call FORTRAN functions from C++ but cannot link
> successfully. My development environment is Dev-C++
> (http://www.bloodshed.net/devcpp.html).
>
> 1. Where can I find a reliable, up-to-date (precompiled) Windows LAPACK
> library?
1. [commercial] Intel MKL
http://www.intel.com/software/products/mkl/features/lin_alg.htm
2. [free] Cygwin http://www.cygwin.com
Also note -- this didn't take much googling. Search term "LAPACK WINDOWS"
FYI: For Linux, Intel now offers the Intel C/C++ and Fortran compilers for
free non-commercial use, as well as the MKL.
COMPILED OPTIONS:
1. Watcom Fortran is free, netlib offers make files for M$ nmake & Watcom.
2. use CLAPACK, which only needs a c-compiler.
> 2. How do I link to such a LAPACK library on a Windows platform (using
> Dev-C++)?
With gcc, lapack is linked by adding '-llapack -lblas' at the end of your gcc
command line. e.g.
$ gcc -o foo foo.c -lm -llapack -lblas
YMMV on mingw/Dev-C++ (which is a gcc compiler).
--
G a b r i e l M . B e d d i n g f i e l d