Skip to content

interfacing ranlib

1 message · Guillot Gilles

#
Hi,

I'm currently trying to interface the package of fortran 
subroutine randlib.f-1.3  (written by Brown, Lovato,  Russell, Venier)
via R the .Fortran() function.

This fortran source code contains a lot of  instructions like 
write(*,*)  'message'
or 
stop 'message'
which are not compatible with R.

In the fortran source code, 
I've changed any occurence of 
write(*,*) 'message'
to 
call rwarn('message')

and 
stop 'message'
to 
call rexit('message')

At the dynamic loading step in R, I get 
the following error message :
Error in dyn.load(x, as.logical(local), as.logical(now)) :
        unable to load shared library 
"/home/guillot/projets/flux/fortran/essai_3/prog3.so":
  /home/guillot/projets/flux/fortran/essai_3/prog3.so: undefined symbol: s_cmp

Does anyone have any suggestion on how to avoid this error message or have 
experience in interfacing this library to R

Thanks,

Gilles


_______________________________________
Gilles Guillot
Unit? de Biom?trie
Institut National Agronomique de Paris-Grignon
16, rue Claude Bernard
75365 Paris cedex 5
t?l : 01 44 08 72 71 
fax : 01 44 08 16 66