Skip to content
Prev 39440 / 63421 Next

fortran 90 underscore error

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:
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
---