Re: [Rd] F77_CALL/NAME problem

2015-03-26 Thread bstr
Thank you John and William for the replies! @John: I downloaded the Fortran files from http://www.netlib.org/lapack/double/ (the link "dgesv.f plus dependencies"). In file dgesv.f the subroutine is declared as SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B,

Re: [Rd] F77_CALL/NAME problem

2015-03-25 Thread William Dunlap
You said you changed F77_NAME(DGESV) to dgesv_ to make it work and inferred that F77_NAME was the the problem. I suspect that things got better because you changed the capitalization and that F77_NAME(dgesv) would have worked as well. Adding #include to your code would declare these things as

Re: [Rd] F77_CALL/NAME problem

2015-03-25 Thread John McKown
On Wed, Mar 25, 2015 at 4:44 AM, bstr wrote: > Dear R-devel, > > I am trying to use Fortran DGESV subroutine into C. Here it is the relevant > part of the C file I am currently writing > > #include > #include > #include > #include > > void F77_NAME(DGESV)( int*, int*, double*, int*, int*, double*,

Re: [Rd] F77_CALL/NAME problem

2015-03-25 Thread bstr
I was not able to find why my old way to do things did not work. However, I "discovered" that dgesv is also in the header Lapack.h. So I just dropped form the C code the declarations F77_NAME/CALL and used directly function dgesv_ as declared in Lapack.h. Of course I had to compile with the -llapac