next up previous 223
Next: ACKNOWLEDGEMENTS
Up: HDS [1ex
Previous: Tuning in Practice


COMPILING AND LINKING

Standalone applications which use HDS may be linked by specifying `hds_link` on the compiler command line. Thus, to compile and link a stand-alone application called "prog", the following might be used:

f77 prog.f -I$STARLINK_DIR/include -L$STARLINK_DIR/lib `hds_link` -o prog

Note the use of the "$-$L" flag to specify the location of the Starlink libraries and the backward quote characters which perform command substitution. Include files are located using the "$-$I" flag.

Users of the ADAM programming environment (SG/4) on UNIX systems need take no special steps in order to link with HDS because the normal commands for building ADAM tasks will do this automatically. Thus, for instance, an A-task which calls HDS routines might be built simply as follows:

alink prog.f

If you want to compile subroutine source code without linking, you should use the "-I" flag as for the standalone example:

f77 -c -I$STARLINK_DIR/include subroutine.f


next up previous 223
Next: ACKNOWLEDGEMENTS
Up: HDS [1ex
Previous: Tuning in Practice

HDS [1ex
Starlink User Note 92
R.F. Warren-Smith & M.D. Lawden
23rd February 1999
E-mail:ussc@star.rl.ac.uk

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