Skip to content Accesskey=4Skip to sub-navigation Accesskey=3View our Accessibility Options MIT Information Systems Home About IS&T Contact IS&T Site Map Search Advanced Search
Getting StartedGetting Services by Topic or Alphabetically Getting Help

On This Page

[Help]

  

Quick Links

Top Level

Related Links

Ask OLC a question

Athena Consulting Homepage

Helpdesk Stock Answers (for Mac/PC questions)


Use f77 -c to do SEPARATE compilations

To separately compile Fortran modules before linking them together, use the
'-c' option to the 'f77' compiler.  For example, if you have two source files,
named 'file1.f' and 'file2.f', type these commands:

	f77 -c file1.f
	f77 -c file2.f

Then, you can link them together with this command:

	f77 file1.o file2.o

You only need to recompile a Fortran module if it has been changed since it
was last compiled.  Once you have recompiled any changed modules, you can link
them together as shown above.  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 weant to learn more about 'f77' or 'make', you can read the manual
pages by using the 'man' command:

	man f77
or
	man make

MIT Home | Getting Started | Getting Services | Getting Help | About IS&T | Accessibility
Ask a technology question or send a comment about this web page.