next up previous 231
Next: FULL FORTRAN SUBROUTINE DESCRIPTIONS
Up: IMG Simple Image Data Access
Previous: Using the NDF library directly


COMPILING AND RUNNING PROGRAMS

Compiling and linking a simple program is very straight-forward. If your program source file is named prog.f, then the commands:
% star_dev
% alink prog.f -L/star/lib `img_link_adam`
will compile the source and link it against IMG (you should replace the /star with where your system is installed on non-Starlink machines). The final product is an executable called prog, that you run by typing:
% prog
(note the % is the shell-prompt and should not be typed, and the `` are grave signs that execute the command img_link_adam). If you have a program that has several modules that are compiled independently then you could use a command like:
% alink prog.f mysub1.o mysub2.o `img_link_adam`
The star_dev command only needs to be run once, as it creates a permanent soft link for accessing the include file SAE_PAR. The alink command is described more fully in SUN/144.



next up previous 231
Next: FULL FORTRAN SUBROUTINE DESCRIPTIONS
Up: IMG Simple Image Data Access
Previous: Using the NDF library directly

IMG Simple Image Data Access
Starlink User Note 160
P.W. Draper
R.F. Warren-Smith
3 March 2003
E-mail:P.W.Draper@durham.ac.uk

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