5 Compiling and Linking Programs with GNS

To include either of the GNS include files, create links in the directory containing the program source code with the command:

  % gns_dev}

and use and include statement such as:

        INCLUDE ’GNS_ERR’
        INCLUDE ’GNS_PAR’

The link procedures for most high level graphics packages (e.g. IDI, SGS etc.) already contain a reference to GNS. Programs that do not link with such packages can be linked to GNS by using the shell script gns_link or gns_link_adam. For example to compile and link an ADAM task called ‘task.f’ the following is used

   % alink task.f ‘gns_link_adam‘

(note the use of the backward quotes)

To compile and link a standalone application called ‘prog.f’ the following is used

  % f77 prog.f -o prog ‘gns_link‘