C/C++ Programmer's Guide (G06.25+)
Compiler Pragmas
HP C/C++ Programmer’s Guide for NonStop Systems—429301-008
13-96
SSV
On the other hand, if you enter the preceding SSV pragma list on the command
line, only the first SSV is set; the others are ignored because of the numerical gap.
•
The native compilers also support the setting of SSVs using ASSIGN statements. If
you use both ASSIGNs and command-line SSV pragmas, the two sets are unioned
together. If the two sets have any duplicate SSV numbers, the SSV specified in the
command line is used.
•
If you use SSV pragmas with TNS C, the compiler subvolume is not searched.
Consequently, if your program needs any standard header file, you must add a
search subvolume (SSV) for the system library.
For example, if you specify any SSV pragmas and your program contains a
standard library file header such as #include <stdioh>, you must have an SSV
pragma for “$system.system” (the location of the stdioh file on the NonStop
host), because the compiler does not automatically search the compiler
subvolume.
•
If you specify SSV pragmas, the compiler does not distinguish between standard
header files and user-defined files. The files are searched according to the SSV
search list that you specified.
•
When using an SSV search list with the native compilers, the default subvolume is
searched. Therefore, you do not need to add an SSV pragma for the default
subvolume in native mode. When using SSVs with the TNS compilers, however,
you do need to add an SSV pragma for the default subvolume.
•
For the default searching paradigm used with #include directives, see #include
on page 12-7.
•
For the native compilers, the way that you specify a #include directive affects the
operation of an SSV search list or a Directories list (in TDS on the PC) as follows:
°
If you specify #include "file" in your source, the compiler searches for the
specified file in the subvolume or directory containing the source file and then
in the search subvolumes or directories.
°
If you specify #include <file> in your source, the compiler searches for the
specified file in the search subvolumes or directories, but not in the subvolume
or directory containing the source file.
Examples
1. This example specifies three search subvolumes:
c / in testc, out $s.#xxx / obj;run,ssv0 "$a.b", ssv1 "$b.d",
ssv2 "$system.system"
2. This example specifies a search subvolume ($A.B) and a search volume ($C):
#pragma ssv0 "$a.b", ssv1 "$c"