[R] Using R's LAPACK & Related files in Visual C++

Timur Elzhov Timur.Elzhov at jinr.ru
Fri Mar 26 15:56:30 CET 2004


On Thu, Mar 25, 2004 at 08:40:30PM -0800, Greg Tarpinian wrote:

> I am a relative newcomer to both the R and C/C++ software worlds --
> I'm taking a C Programming class currently.  I noticed the other day
> that the
> 
> C:\Program Files\R1_8_1\src\include\R_ext
> 
> directory on my WinXP box has the header files
> 
> BLAS.h
> Lapack.h
> Linpack.h
> RLapack.h
> 
> I am interested in (perhaps) using one or more of these header files
> in a straight C program I'm working on in Visual C++ .NET.  (I need
> matrix inversion, svd, generalized inverse, Cholesky decomposition,
> and a few other matrix features for a class project and this is the
> first time I've ever worked with header files.) My attempts to get the
> freely available CLAPACK3-Windows.zip on
> 
> http://www.netlib.org/clapack/

AFAIK, R uses native FORTRAN l(a,in)pack codes :)  Try it, I guess you'll
be able to call their functions, this way:
  void dposl_(double*, int*, int*, double*); //for `dposl' Fortran function

Note underscore `_' under function name! ;)

--
WBR,
Timur.




More information about the R-help mailing list