[R] DLL for calling Fortran subroutines

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Nov 13 13:12:38 CET 2000


> Date: Mon, 13 Nov 2000 11:27:27 +0100
> From: isabelle Zabalza-Mezghani <isabelle.zabalza-mezghani at ifp.fr>
> 
> I'm trying to use fortran subroutines in a R function. I've generated a
> DLL file using my fortran subroutines, and I've got a DLL which includes
> an export table with the names of my subroutines.

How did you generate it?

> Then, I use the R command library(test), where test is a directory
> located in the R library tree and which contains a R directory (with my
> R functions) and a libs directory (with my test.dll).
> Everything seems to be ok, but when I try the R command :
> is.loaded(symbol.For("functest")), R returns False.
> Furthermore, when I try to execute the R function which calls
> Fortran("functest",...) I've got the following message :
>  "Error in .Fortran("functest",...) : C/Fortran function name not in
> load table".
> 
> If someone has a solution to this problem ....

Use pedump.exe -e to see what your DLL actually exports.  If you generated
the DLL with a compiler other than our recommended setup, you will
probably need to use .C not .Fortran.


-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list