I've installed the port gcc47 @4.7.3. Now how do I use it to compile a FORTRAN
program. E.g., suppose I have file sum.f:
==
program sum
implicit none
real a,b,s
c
print *, ' Type two numbers:'
read *, a, b
s = a + b
print
Hi,
What exactly do I type at the Terminal command line to compile that,
gfortran-mp-4.7 sum.f
and what kind of name do I give for the output file (sum.bin or sum.cmd or
what?)
The above will create the default 'a.out' for you. To control that, use the -o
option.
cheers Chris
p.s. The
Yep, sorry about the missing initial indent character.
Thanks for the additional tip, about the -o option which, like invoking the
compiler itself, I couldn't find in the on-line Using GNU Fortran!
On Apr 23, 2013, at 5:29 PM, Chris Jones jon...@hep.phy.cam.ac.uk wrote:
Hi,
What exactly
That would be due to the first two sentences at the beginning of Chapter 2 of
that document: The gfortran command supports all the options supported by the
gcc command. Only options specific to GNU Fortran are documented here. If
you're new to compiling, you might want to check out. The list