next up previous
Next: Efficiency Considerations
Up: CHR Character Handling Routines
Previous: Error Handling

Compiling and Linking  

The two include files available for use with the Character Handling Routines are named sae_par and chr_err on UNIX machines, and reside in the directory /star/include.

When including these files within Fortran code, 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.

*  Global Constants:
      INCLUDE 'SAE_PAR'
      INCLUDE 'CHR_ERR'
Assuming that the software has been installed in the standard way and /star/bin has been added to the environment variable PATH, soft links with these upper-case names pointing to the required file are set up in the user's working directory by the the commands:
% star_dev
% chr_dev
Then to compile and link a non-ADAM program, the command line would be, e.g.
% f77 -o program program.f -L/star/lib `chr_link`
The CHR library is included automatically when programs are linked using the ADAM application linking commands, alink etc.

If it is necessary to link explicitly with the ADAM version of CHR ( e.g. to produce a shareable library), the script chr_link_adam is available in /star/bin. The link command might be:

% ld -shared -o libmypkg.so.1.0 -lmypkg `chr_link_adam`


next up previous
Next: Efficiency Considerations
Up: CHR Character Handling Routines
Previous: Error Handling



CHR Character Handling Routines
Starlink User Note 40
A C Charles
P C T Rees
A J Chipperfield
2 August 1995
E-mail:ussc@star.rl.ac.uk