next up previous
Next: Changes and New Features
Up: UNIX Command Descriptions
Previous: ast_link - Link a program with the AST library

   
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 ``ast_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 import.o -L/star/lib `ast_link_adam -csla`

Links an ADAM program ``import'', written in C, which does not produce any graphical output. The ``-csla'' flag indicates that the C version of SLALIB should be used by AST (to avoid conflict with the main program which may already be calling this version).

alink plotit.o -L. -L/star/lib `ast_link_adam -mygrf` -lgrf_my

Links an ADAM program ``plotit'', written in C. The ``-mygrf'' switch indicates that graphical output will be delivered through a graphical interface which you have implemented yourself. Here, this interface is supplied by means of the ``-lgrf_my'' library reference.

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

  • ``-csla'': Requests that the program be linked so that it uses the C implementation of the SLALIB positional astronomy library. By default, the Fortran implementation is used (Starlink User Note SUN/67). Note that both implementations of SLALIB use the same name (``libsla.a'') for their library, so you must ensure that the directories searched to resolve library references will result in the correct version of this file (Fortran or C) being located.
  • ``-myerr'': Requests that no arguments be generated to specify how error messages produced by the AST library should be delivered. You should use this option only if you have implemented an interface to a new error delivery system yourself and wish to provide your own arguments for linking with it. By default, error messages are delivered in the standard ADAM way via the EMS Error Message Service (Starlink System Note SSN/4).
  • ``-mygrf'': Requests that no arguments be generated to specify which graphics system is used to display output from the AST library. You should use this option only if you have implemented an interface to a new graphics system yourself and wish to provide your own arguments for linking with it.
  • ``-pgp'': Requests that the program be linked so that graphical output from the AST library is displayed via the Starlink version of the PGPLOT graphics package (which uses GKS for its output). By default, no graphics package is linked and this will result in an error at run time if AST routines are invoked that attempt to generate graphical output.
  • ``-pgplot'': Requests that the program be linked so that graphical output from the AST library is displayed via the standard (or ``native'') version of the PGPLOT graphics package. By default, no graphics package is linked and this will result in an error at run time if AST routines are invoked that attempt to generate graphical output.



next up previous
Next: Changes and New Features
Up: UNIX Command Descriptions
Previous: ast_link - Link a program with the AST library

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 211
R.F. Warren-Smith & D.S. Berry
30th April 2003
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2003 Central Laboratory of the Research Councils