Skip to content

Compiling a FORTRAN program under Windows 7

3 messages · Mikael Anderson, Clint Bowman, Berend Hasselman

#
You are compiling a subroutine not a program and you compile line 
should read:

gfortran testit.f -c testit.o

You then reference that object code testit.o in your final loading 
stage after compiling other routiens and the main program.
#
Mikael Anderson wrote:
In addition to the previous remarks, you would do yourself a favour by
utilizing the implicit-none option of gfortran. That will force you to
declare every variable (and its type) which will avoid many nasty bugs.
In your case: x is a REAL single precision but with R you will preferably
need double precision.
So I would advise you to use

gfortran -fimplicit-none ......

Berend

--
View this message in context: http://r.789695.n4.nabble.com/Compiling-a-FORTRAN-program-under-Windows-7-tp3498663p3498839.html
Sent from the R help mailing list archive at Nabble.com.