Hi,

 

I just started using R a few weeks ago and have a problem with linking Fortran subroutines to R. For some reasons, I need to compile a Fortran program in R (or Splus) and the whole program consists a couple of subroutines, say, subA and subB. There is no difficulty in linking the subroutines individually, but two subroutines are nested, as shown below, 

 

SUBROUTINE subA(arg.)

EXTERNAL subB

бн.

CALL subB(arg.)

бн. 

RETURN

END

 

SUBROUTINE subB (arg.)

бн.

RETURN

END

 

Obviously, if subA(.dll) and subB(.dll) are individually linked to R, subB will not be called within subA. In fact, R does not recognise the command CALL subB( )! Further, in the real situation, subB is called several times with different inputs within subA, so it will be impossible to merge two subroutines into one. 

 

I am here asking whether there is any way to solve this problem, and I hope the question is clearly explained.

 

Thanks in advance for any help!

 

Philip


	[[alternative HTML version deleted]]


