Technical data

Compiling and Linking
5
Figure 1-2 Compiling Multilanguage Programs
Linking Objects
You can use the f77 driver command to link edit separate objects into one
executable program when any one of the objects is compiled from a Fortran
source. The driver recognizes the .o sufx as the name of a le containing
object code suitable for link editing and immediately invokes the link editor.
The following command link edits the object created in the last example:
% f77 -o myprog main.o rest.o
You can also use the cc driver command, as shown below:
% cc -o myprog main.o rest.o -lF77 -lU77 -lI77 -lisam -lm
C Preprocessor
C Front End
Code Generator
Assembler
main.c
main.o
C Preprocessor
Fortran Front End
Code Generator
Assembler
rest.f
rest.o