next up previous 204
Next: VMS
Up: Compiling and Linking
Previous: Compiling and Linking

Unix

On a Unix system, the FORTRAN compiler will only look for include files in the directory that contains the source code of the program being compiled unless the include file is given as an explicit path name. Consequently, the best way of naming include files on a Unix system is to use soft links. For example, the program contains lines such as:

INCLUDE 'SAE_PAR'

and you create a soft link in your directory with the command:

% ln -s /star/include/sae_par SAE_PAR

A shell script called fio_dev is provided to create the appropriate soft links for the FIO library.

To compile and link a program that uses FIO, type:

% f77 prog.f -L/star/lib `fio_link`

To compile and link an ADAM program that uses FIO, type:

% alink prog.f `fio_link_adam`


next up previous 204
Next: VMS
Up: Compiling and Linking
Previous: Compiling and Linking

FIO/RIO FORTRAN file I/O routines
Starlink User Note 143
P M Allan
A J Chipperfield
20 July 2001
E-mail:starlink@jiscmail.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils