[R] dyn.load a f90 module.

Duncan Murdoch murdoch at stats.uwo.ca
Mon Oct 24 00:47:31 CEST 2005


Bo Peng wrote:
>>If there are symbols present then unix 'nm' should show them to you.
> 
> 
> Interestingly:
> 
> % nm myfile.so
> 00000004fc T myfile_
> % R
> 
>>dyn.load('myfile.so')
>>is.loaded('myfile_')
> 
> [1] TRUE
> 
>>..Fortran('myfile_')
> 
> Error in .Fortran('myfile_'):
>   'Fortran" function name not in load table.
> 
> So, myfile_ is loaded but is not callable by R?

.Fortran automatically appends an underscore (on most platforms).  Try 
.Fortran('myfile') instead (or use .C('myfile_')).

Or update to the current release of R, which gives a more informative 
error message.

Duncan Murdoch




More information about the R-help mailing list