Skip to content
Prev 2652 / 15075 Next

Using LAPACK/BLAS with downloaded binary

On 5/11/06, Rafael Kaufmann Nedal [Bill] <rafael.kaufmann at gmail.com> wrote:
Thanks for checking.
The best way to do this is to create a package from the code and
include in the src directory a file called Makevars with the line

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS)

See section 1.2.1 of the manual "Writing R Extensions" on any of the CRAN sites.
By the LAPACK driver routines do you mean the C functions that are
called by R functions like `svd'?  It is neither easy nor necessary to
understand how those work if you only want to call Lapack from
compiled code in a package.  Those C functions are difficult to
understand because they must allow for internal or external Lapack and
BLAS libraries.  In the case of code that will be compiled in a
package all that needs to be done is to link it against the correct
library at compile time, which is a much easier process.