There are three Fortran include files available for use with the Error Message Service:
EMS_ERR (see Appendix E for details of the symbolic constants which they define). The
Starlink convention is that the name in upper case with no path or extension is specified when
including these files within Fortran code, e.g.:
Equivalent header files are installed in
/star/include for use in C code which is calling EMS – they
ems_err.h. In addition,
ems.h contains the function prototypes
for each of the C functions. The syntax
should be used within the C code, and the compiler option
-I/star/include used when compiling C
and Fortran code.
The Error Message Service is included automatically when programs are linked using the ADAM
application linking commands,
To link a non-ADAM Fortran program with the the Error Message Service, the command line would be something like:
The command to compile and link a C program might be:
Note that the commands used to invoke the C and Fortran compilers vary from one UNIX implementation to another (indeed, there may be more than compiler of each type on the same machine).
If the C program makes no use of the EMS Fortran interface, the
‘ems_link‘ command may be
‘ems_link Conly‘. This will avoid the linker looking for the Starlink CNF library, which
may not be present at a non-Starlink site.