[R] Including Fortran subrutines in a package
Bill Northcott
w.northcott at unsw.edu.au
Mon Aug 15 01:55:59 CEST 2005
On 14/08/2005, at 8:00 PM, r-help-request at stat.math.ethz.ch wrote:
> I am creating a packege and I would like to inclued some Fortrun
> subrutines.
> I have two questions.
> 1. Can I use "free form fortan" - compiles well usinf g77 -ffree-form.
> 2. Is it enough to place the ".for" files in scr folder?
gcc Fortran is in the process of moving from g77 which goes with
gcc-3.x to gfortran which goes with gcc-4.x.
AFAIK -ffree-form is the default for g77 but not for gfortran if the
source file has the .f .for extensions. Free form is the default
for .f90 .f95 extensions. So maybe
1. include the -ffree-form option so that thing will not break with
gfortran.
2. don't assume the gcc Fortran compiler is g77.
Bill Northcott
More information about the R-help
mailing list