[R] dyn.load() function problem help!
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Jun 18 18:37:05 CEST 2003
On Wed, 18 Jun 2003, Thomas Lumley wrote:
> On Wed, 18 Jun 2003, Mu Yunming wrote:
>
> > >
> > My source code is writen in fortran 90 and i complied the source code using
> > command f90. How do you think I should complie my source file and build the
> > shared library?
> >
>
> You probably need to figure this out: R doesn't explicitly support F90 on
> any platform.
>
> Two things are needed
> 1/ You have to be able to create a DLL that is properly linked to all the
> libraries it needs. Your compiler documentation should tell you how to do
> this.
That's the main step. Something like
f90 -G -o aaa.so aaa.f
might well do it (that's the Solaris syntax, BTW).
> 2/ The functions you call from R need to use the same calling conventions
> as the compilers used to compiler R. Duncan Murdoch has information at
> http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/
> that describes how to do this for various compilers. Even if your's isn't
> on the list this might still be helpful
That's for Windows: he did say `Unix', unspecified.
--
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