Bill Shipley
2010-Jul-13 19:40 UTC
[R] compiling, linking and including multiple FORTRAN subroutines in R
Although there are a number of documents describing library development, in which compiling and using C or FORTRAN source code is discussed, such documents are too detailed and complicated for my limited needs (i.e. I can't follow them!). I am looking for a worked example (i.e. the series of commands etc) that does the following from within a WINDOWS environment: Given a series (i.e. more than one) of files containing FORTRAN source code for subroutines 1. how to compile and link these subroutines using the g77 compiler that is included in the R Tools (one main subroutine will call a series of other subroutines) to produce a .DLL file 2. how to call this compiled subroutine, linked to the others, from within an R function so that one can pass the arguments to the subroutine and get the returned values. I am familiar with FORTRAN programming and with R but not with the interface of the two. Thanks for any help or leads. Bill Shipley Bill.Shipley at USherbrooke.ca