5 Compiling and Linking with CTG

 5.1 ADAM Applications

This section describes how to compile and link applications which use CTG subroutines, on UNIX systems. It is assumed that the CTG library is installed as part of the Starlink Software Collection.

The library only has an ADAM interface to obtain the groups of catalogues.

5.1 ADAM Applications

Users of the ADAM programming environment (SG/4) should use the alink command (SUN/144) to compile and link applications, and can access the CTG_ library by including execution of the command ctg_link_adam on the command line, as follows:

  % alink prog.f ‘ctg_link_adam‘

where prog.f is the Fortran source file for the A-TASK. Again note the use of opening apostrophies (‘) instead of the more usual closing apostrophy (’) in the above alink command.

To build a program written in C (instead of Fortran), simply name the source file prog.c, instead of prog.f.