Technical data

Libraries and Loaders [A]
This appendix describes the libraries that are available with the Cray Standard
C/C++ Programming Environment and the loaders, ld(1) and cld(1).
A.1 Cray Standard C/C++ Libraries Current Programming Environments
Libraries that support Cray Standard C/C++ are automatically available on all
systems when you use the CC(1), cc(1), or c89(1) commands to compile your
programs. These commands automatically issue the appropriate directives
to load the program with the appropriate functions. If your program strictly
conforms to the C or C++ standards, you do not need to know library names and
locations. If your program requires other libraries or if you want direct control
over the loading process, more knowledge of loaders and libraries is necessary.
The Standard Template Library (STL) is a C++ library of container classes,
algorithms, and iterators; it provides many of the basic algorithms and data
structures of computer science. The STL is a generic library, meaning that its
components are heavily parameterized: almost every component in the STL is
a template. Be sure you have a complete understanding of templates and how
they work before using them.
A.2 Loaders
When you issue the cc(1), CC(1), or c89(1) commands to invoke the compiler,
and the program compiles without errors, the loader is called. Specifying the
-c option on the command line produces relocatable object files without calling
the loader. These relocatable object files can then be used as input to the loader
command by specifying the file names on the appropriate loader command line.
For example, the following command line compiles a file called target.c and
produces the relocatable object file called target.o in your current working
directory:
cc -c target.c
You can then use file target.o as input to the loader or save the file to use
with other relocatable object files to compile and create a linked executable file
(a.out by default).
S217936 153