Compiling and Linking a Program



next up previous contents index
Next: Running a Program Up: A First Example Previous: A Simple Program

Compiling and Linking a Program

     

The Fortran M compiler, fm, is used to compile a Fortran M source file. The Fortran M compiler is used in a similar manner to other Unix-based Fortran compilers.

Because our program is contained in a file example1.fm, we type fm -c example1.fm

This produces example1.o, which contains the object code for this Fortran M source file.

Next we must link the example1.o object file with the Fortran M run-time system and the system libraries. This is accomplished by running fm -o example1 example1.o

As with most Fortran compilers, the -o flag specifies that the name of the executable produced by the linker is to be named example1.

For more information on compiling and linking Fortran M programs, see §4.1.



Steve Tuecke
Tue Aug 30 12:20:34 CDT 1994