[R] Fortran interface

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Apr 15 11:07:59 CEST 2003


This is Windows (unstated)!

It will not work anyway: the symbol is "_avg", and symbol.For does that
mapping for you.  However, the @12 is a linker instruction saying this is 
stdcall and not cdecl.

The recommended compiler etc does not do this.  Please either use it or at 
least read the documentation (in readme.packages).  We do not support
stdcall, nor do we offer support for other compiler systems.  But you 
should be able to produce cdecl linking from a Fortran Windows compiler.

On Tue, 15 Apr 2003, Cheolyong Park wrote:

> Hello!
> 
> I have some difficulty in interfacing with Fortran.
> 
> I made the dll file of fortran subroutine named "avg" and its symbol
> name is "_avg at 12".
> I successfully loaded the dll file via dyn.load ( is.loaded("_avg at 12").)
> was TRUE).
> The problem is that nether .Fortran("_avg at 12", ... ) nor .Fortran("avg",
> ...) could call the subroutine avg.
> My understanding is that the first argument of .Fortran is the
> subroutine name not the symbol name.
> Is there any way to use the symbol name directly in .Fortran function?
> 
> Please give me a clue!
> 
> Cheolyong Park.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list