On Fri, 11 Aug 2006, Jeffrey Lewis wrote: > 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)
R manuals have no page numbers, and you are probably using a non-standard page size (Americans do ignore ISO sizes). > 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? Yes, this was fixed in R-devel recently (and spaces allowed in the relevant paths). To work around this you need to specify the F95 objects in your Makevars.win, e.g. OBJS=$(FCSOURCES:.f90=.o) I've just backported the fix to R-patched. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel