7 Compiling and Linking with IRQ

 7.1 Standalone Applications
 7.2 ADAM Applications

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

7.1 Standalone Applications

Standalone applications which use IRQ_ routines may be linked by including execution of the command “irq_link” on the compiler command line. Thus, to compile and link a Fortran application called “prog”, the following might be used:

  % f77 -I$STARLINK_DIR/include prog.f -L$STARLINK_DIR/lib ‘irq_link‘ -o prog

Note the use of backward quote characters, which cause the “irq_link” command to be executed and its result substituted into the compiler command.

7.2 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 IRQ_ library by including execution of the command irq_link_adam on the command line, as follows:

  % alink adamprog.f ‘irq_link_adam‘

where adamprog.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 adamprog.c, instead of adamprog.f.