Why not put the two subroutines into one file and compile them into one DLL? Or compile them separately into .o, but make them into one DLL.
Andy > From: Li, Guang Q > > 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]] > > ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
