##
Linking with AST Facilities

C programs which use AST facilities may be linked by including execution of the command “ast_linkast_link” on the compiler command line. Thus, to compile and link a program called “prog”, the following might be used:

302#302

Note the use of backward quote characters, which cause the “ast_link” command to be executed and its result substituted into the compiler command. An alternative is to save the output from “ast_link” in (say) a shell variable and use this instead. You may find this a little faster if you are building software repeatedly during development.

Programs which use AST can also be linked in a number of other ways, depending on the facilities they require. In the example above, we have used the default method which assumes that the program will not be generating graphical output, so that no graphics libraries need be linked. If you need other facilities, then various switches can be applied to the “ast_link” command in order to control the linking process.

For example, if you were producing graphical output using the PGPLOT graphics package, you could link with the AST/PGPLOT interface by using the “87#87pgplot” switch with “ast_link”, as follows:

303#303

See the “ast_link” command description in Appendix E for details of the options available.