The Fortran compiler used on SUN workstations is f77. f90 is also available on some machines.
man f77 To quit reading, type q .
f77 prog1.f New files were created in your directory during the compile process. These files are described below:
prog1.o | Object file used to create executable.
a.out | Executable file which is ready to run.
You may wish to name your executable file prog1. Remove the old executable and compile your program again using this command:
f77 -o prog1 prog1.f
f77 -g prog1.f | Will allow debugging on executable.
f77 -o prog1.f | Will produce a prog1.o without an a.out.
f77 -lm prog1.f | Will link the /usr/lib/libm.a (math) library to a.out.
f77 -M prog1.f | Will list the libraries and routines called by prog1.f.
cd /usr/mtu/imsl.idf | will take you to IMSL directory
imsl.idf | will fire up the IMSL interactive documentation facility.
To use IMSL you will need to set two environment variables:
setenv LD_LIBRARY_PATH=/usr/mtu/imsl
setenv LM_LICENSE_FILE=/usr/mtu/imsl/bin/license.dat
and link IMSL to your program:
f77 filename.f -limslib | will link /usr/mtu/imsl/libimsl.sa.0.1
prog1 < data1 To execute your program and save the output to a file, use the ``greater than'' arrow:
prog1 > output1 If you are using both data and output files, the correct form would be:
prog1 < data1 > output1