Re: [Rd] fortran 90 underscore error

From: Prof Brian Ripley <>
Date: Tue, 15 Mar 2011 06:32:00 +0000 (GMT)

We have no position about Fortran 90. We provide the means to specify an F90 compiler and note that its use is not portable as not all platforms have one. (A very few are still using gcc3 with g77.)

This simply is not an R issue, and seems specific to your unstated platform (*PLEASE* do follow the posting guide).

On Mon, 14 Mar 2011, wrote:

> Hi there,
> I am preparing a package based on Fortran 90 code. I've put the main code
> is a MODULE, and I'm having several error messages with the linker:
>> R CMD SHLIB nrtype.f90 topbalmod.f90 runmodels.f90
> The several error messages are related with the addition of an underscore
> to function names (no problem with subroutine names). E.g.:
> topbalmod.o:topbalmod.f90:<.text+0x357f>: undefined reference to 'runga_'
> After some googling, AFAIK, it seems the addition of underscores (I'm
> using gfortran) may be avoided by the option -fno-underscoring, but its
> use is not recomended as it is not of general use by all compilers.
> I'm just wondering if R developers just recommend not to use user defined
> fortran functions at all to avoid this problem, or alternatively if you
> could provided with some example about how to circumvent it (perhaps to
> convert all fortran 90 functions into subroutines?).
> Thanks and best regards.
> Javier
> ---

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
Received on Tue 15 Mar 2011 - 06:47:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Mar 2011 - 11:30:32 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive