[Rd] Small problem building a package containing .f90 source on Windows

Jeffrey Lewis jblewis at ucla.edu
Sat Aug 12 03:47:23 CEST 2006


I am working on a package that includes some Fortran 90 source
code, it builds and functions correctly, but I did run into a
little problem when building the Windows version that I thought
might of interest.

In 'Writing R Extensions' (2.3.1, 01 Jun 2006), the authors note
that .f90 code can be used in packages on Windows if an F95
compiler (such a gfortran) is installed and if the user

"...Set[s] F95 in MkRules to point to the installed compiler. Then
R CMD SHLIB and R CMD INSTALL work for packages containing FORTRAN
90/95 source code." (p. 13)

I found that it was also necessary to alter line 17 of
gnuwin32/MakeDLL to include FCSOURCES in the list of variables
that are used to form OBJSA.  Without making that addition,
neither SHLIB nor INSTALL compiled my .f90 files (though they both
used gfortran to build a .dll from the other object files that were
correctly compiled from .c source).

Is this the correct solution to this problem?

Best,

Jeff



More information about the R-devel mailing list