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:
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:
If you want to compile subroutine source code without linking, you should use the “-I” flag as for the standalone example: