[R] I/O fortran instructions and dyn.load
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed May 26 16:23:08 CEST 2004
Try
R CMD SHLIB test.f
If SHLIB know it has to deal with Fortran code, it adds the appropriate
libraries.
On Wed, 26 May 2004, Gilles GUILLOT wrote:
> I have the following Fortran code
>
> subroutine sub(path)
> character*100 path
> open(10,file=path)
> end
>
> saved as test.f
>
> which I compile with
> g77 -c test.f
>
> then I make the shared libary in R (Version 1.9.0) with
> system("R CMD SHLIB test.o")
>
> so far, everything OK.
>
> But
> dyn.load("test.so")
> returns the following error message:
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library "test.so":
> test.so: undefined symbol: f_open
>
> I get similar error messages with r/w Fortran instructions like
> write(*,*) , read(*,*)
>
> I used to use such programs on my computer under mandrake linux 10.
> The problem reported occurs on a new server operating under
> another linux distrib (debian).
>
> Thanks in advance for any help,
> Gilles
>
--
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