From: Prof Brian D Ripley (ripley@stats.ox.ac.uk)
Date: Wed 25 Jul 2001 - 16:32:33 EST
Message-id: <Pine.GSO.4.31.0107250727530.27616-100000@auk.stats>
See `Writing R Extensions' for the information.
R CMD SHLIB hello.f
> dyn.load("hello.so")
might be what you need. dyn.load in R loads shared libraries (on Linux),
not .o objects. The error message does say your hello.o is not a valid
shared library.
Looks like the help page for dyn.load needs a cross-reference to SHLIB.
On Tue, 24 Jul 2001, Natalie Hawkins wrote:
>
> Hi,
>
> I would like to use a Fortran subroutine in R. I have checked the R
> docs and Newsletter,
> but..., I am unable to load an object file into R.
>
> The steps I have taken are (on Debian Linux/recent Intel-type chip ):
>
> 1. g77 -c hello.f
> to create hello.o
>
> 2. mymachine> R
> to start R
>
> 3. > dyn.load("hello.o")
> at which point I am getting the error msg:
>
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library "/home/hawkins/Rfortran/hello.o":
> /home/hawkins/Rfortran/hello.o: ELF file's phentsize not the expected
> size
>
> Can anyone (please) correct my procedure, offer a suggestion?
>
> thanks,
> Natalie Hawkins
-- Brian D. Ripley, ripley@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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2.1.3 : Wed 10 Mar 2004 - 08:18:21 EST