[R] R shared object with Fortran archive files
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon May 15 17:48:42 CEST 2006
On Mon, 15 May 2006, Theo Bell wrote:
> Hi,
>
> I am trying to create an R shared object using the R CMD SHLIB
> command. I have some .o object files and some .a archive files (for
> which I do not have the source code).
>
> R does not seem to include the code that is in the .a files, as when I
> use nm on the resulting shared library, there are lots of undefined
> symbols and dyn.load complains of undefined symbols. I have checked
> the .a archives and the symbols are defined there.
>
> Basically, I want to know if it is possible to include Fortran .a
> archive files as objects to be included in an R shared library. And if
> so, how?
Well, not as objects but as an archive. Try
export PKG_LIBS=-L/path/to/archive -lmyar.a
or similar.
--
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