Notice! This document is currently in
Archived
status.
The content of this document may be incorrect or outdated.
The content of this document may be incorrect or outdated.
Print this article Edit this article
Using f77-c to do separate compilations
f77 -c file1.fYou now have 2 object code files named file1.o and file2.o.
f77 -c file2.f
Now you can link them together with this command:
f77 file1.o file2.oYou can use this strategy to save time as you develop your code. You only need to recompile those Fortran modules that have been changed since it was last compiled. Once you have recompiled any changed modules, you can link them together as shown above. As your modules get larger, doing this can save you quite a bit of time.
If you have many modules in your program, you may want to consider using 'make' which automatically figures out which of your modules need to be recompiled (by checking when they were last modified), and then links them.
If you want to learn more about 'f77' or 'make', you can read the manual pages by using the 'man' command:
man f77or
man makeNOTE: On the RS/6000 workstations the name of the Fortran compiler is "xlf", and not "f77".
Last Modified:
Dec 19, 2016 11:12 am US/Eastern
Created:
Jun 21, 2007 12:51 pm GMT-4
by
admin
JumpURL: