ast_link_adam

Link an ADAM program with the AST library

Description:

This command should only be used when building Starlink ADAM programs which use the AST library, in order to generate the correct arguments to allow the ADAM “alink command to link the program. The arguments generated are written to standard output but may be substituted into the “alink command line in the standard UNIX way using backward quotes (see below).

By default, it is assumed that you are building an ADAM program which does not produce graphical output. However, switches are provided for linking other types of program. This command should not be used when building stand-alone (non-ADAM) programs. Use the “??link

command instead.

Invocation

alink program.o -L/star/lib ‘ast_link_adam [switches]‘

Examples:

alink display.o -L/star/lib ‘ast_link_adam -pgplot‘
Links an ADAM program “display which uses the standard version of PGPLOT for graphical output.
alink plotit.o -L. -L/star/lib ‘ast_link_adam -grf‘ -lgrf
Links an ADAM program “plotit , written in C. The “-grf switch indicates that graphical output will be delivered through a graphical interface which you have implemented yourself, which corresponds to the interface required by the current version of AST. Here, this interface is supplied by means of the “-lgrf library reference.
alink plotit.o -L. -L/star/lib ‘ast_link_adam -grf_v2.0‘ -lgrf
Links an ADAM program “plotit , written in C. The “-grf_v2.0 switch indicates that graphical output will be delivered through a graphical interface which you have implemented yourself, which corresponds to the interface required by version 2.0 of AST. Here, this interface is supplied by means of the “-lgrf library reference.

Switches

The following switches may optionally be given to this command to modify its behaviour:

SLALIB

The AST distribution includes a cut down subset of the C version of the SLALIB library written by Pat Wallace. This subset contains only the functions needed by the AST library. It is built as part of the process of building AST and is distributed under GPL (and is thus compatible with the AST license). Previous version of this script allowed AST applications to be linked against external SLALIB libraries (either Fortran or C) rather than the internal version. The current version of this script does not provide this option, and always uses the internal SLALIB library. However, for backward compatibility, this script still allows the " -fsla" and " -csla" flags (previously used for selecting which version of SLALIB to use) to be specified, but they will be ignored.