[R] Error calling Fortran code
Prof Brian D Ripley
ripley at stats.ox.ac.uk
Wed Jan 30 11:57:19 CET 2002
On Wed, 30 Jan 2002, GIORGI Roch wrote:
> Dear R users,
>
> I have to use a R function which call a Fortran code:
> result <- .Fortran("Name", arguments)
>
> I have the following error message:
> R> Error in .Fortran("Name", arguments ....
> R> C/Fortran function name not in load table
>
> Any ideas?
1) You did not load the appropriate DLL containing the compiled code.
2) The DLL does not export the symbol. Try pedump -e on it and check that
Name_ (note the underline) is being exported.
It is unlikely that Fortran could produce a mixed-case symbol like that.
My bet is that it is name_. But do check with pedump.
> I am working on PC with R 1.4.0 (loading from R Binaries, Windows, Base,
> SetupR.exe installation with all the components) on Windows NT.
R's internals could be a bit cleverer about this, but it would be easy to
be too clever, so for portability write Fortran in lower case and use only
lower-case symbols in .Fortran calls. (I suspect there is a system out
there that maps Fortran symbols to upper case, and there are compiler
options to do so, in which case R sould not build.)
--
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