[R] Including Fortran subrutines in a package

From: Bill Northcott <w.northcott_at_unsw.edu.au>
Date: Mon 15 Aug 2005 - 09:55:59 EST

On 14/08/2005, at 8:00 PM, r-help-request@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

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Aug 15 10:07:30 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:19:43 EST