Technical data

4
Chapter 1: Compiling, Linking, and Running Programs
The default name of the executable object le is a.out. For example, the
command line
% f77 myprog.f
produces the executable object a.out.
You can specify a name other than a.out for the executable object by
using the driver option o name, where name is the name of the
executable object. For example, the command line
% f77 myprog.o -o myprog
link edits the object module myprog.o and produces an executable object
named myprog.
The command line
% f77 myprog.f -o myprog
compiles and link edits the source module myprog.f and produces an
executable object named myprog.
Compiling Multilanguage Programs
The compiler system provides drivers for other languages, including C,
Pascal, COBOL, and PL/1. If one of these drivers is installed in your system,
you can compile and link your Fortran programs to the language supported
by the driver. (See the IRIX Series Compiler Guide for a list of available drivers
and the commands that invoke them; refer to Chapter 3 of this manual for
conventions you must follow in writing Fortran program interfaces to C and
Pascal programs.)
When your application has two or more source programs written in different
languages, you should compile each program module separately with the
appropriate driver and then link them in a separate step. Create objects
suitable for link editing by specifying the c option, which stops the driver
immediately after the assembler phase. For example,
% cc -c main.c
% f77 -c rest.f
The two command lines shown above produce linkable objects named
main.o and rest.o, as illustrated in Figure 1-2.