3 Linking

 3.1 Use with the UNIX operating system
 3.2 Use with the VAX/VMS operating system

3.1 Use with the UNIX operating system

Assuming all Starlink directories have been added to the environment variables PATH and LD_LIBRARY_PATH (see SUN/118), then to link a non-ADAM program with SNX and NCAR the command line would be:

  % f77 program.o -L/star/lib ‘snx_link‘ -o program.out

This command line will link with the SNX, NCAR and SGS libraries.

Two subroutines provided by SNX exist in other forms elsewhere and require special handling. The first gives access to the special fonts provided by the NCAR routine PWRITX: it is a Starlink version of the NCAR subroutine AGPWRT. The second intercepts and changes the numeric labels produced by AUTOGRAPH, turning “.1" and “ .5" into “0.1" and “ 0.5" etc.: it is a Starlink version of the NCAR subroutine AGCHNL. These routines will be automatically linked by using ‘snx_link‘ if you have called the SNX routine SNX_AGOP. If you are using SNX routines as part of an NCAR/SGS mix, and have not called SNX_AGOP to initialise the graphics system, you must link with the objects directly:

  % f77 program.o /star/lib/agpwritx.o /star/lib/agchnlz.o \
         -L/star/lib ‘snx_link‘ -o program.out

(It is important to realise that the use of the special fonts will naturally incur a speed penalty. Advice on this is given in §7.)

Compiling and linking ADAM applications is discussed in Appendix A.

3.2 Use with the VAX/VMS operating system

Non-ADAM programs may be linked with the SNX and NCAR libraries by

  $ LINK program, NCAR_DIR:SNX_LINK/OPT, STAR_LINK/OPT

This command line will link with the SNX, NCAR and SGS libraries.

Compiling and linking ADAM applications is discussed in Appendix A.