[Rd] R problems with lapack with gfortran

Steve Kargl @gk @end|ng |rom troutm@@k@@p|@w@@h|ngton@edu
Sat May 4 18:49:03 CEST 2019

On Sat, May 04, 2019 at 06:42:47PM +0200, Thomas König wrote:
> > - figure out Fortran2003 specification for C/Fortran interoperability
> > -- this _sounds_ like the right solution, but I don't think many
> > understand how to use it and what is implied (in particular, will
> > it require making changes to LAPACK itself?)
> That would actually be fairly easy.  If you declare the subroutines
> BIND(C), as in
>        subroutine foo(a,b) BIND(C,name="foo_")
>        real a
>        character*1 b
>        end
> you will get the calling signature that you already have in your C
> sources.
> This also has the advantage of being standards compliant, and would be
> probably be the preferred method.

With the caveat that one may need to use the VALUE attribute to
account for pass-by-value vs pass-by-reference.


More information about the R-devel mailing list