C/C++ Programmer's Guide (G06.25+)
Preprocessor Directives and Macros
HP C/C++ Programmer’s Guide for NonStop Servers—429301-002
12-8
#include
In the OSS environment, the compiler searches for source_file using operands
specified in the c89 utility -I flag.
library_header_file
is the name of the library header file you want to include. The compiler assumes
that library header files reside in the same volume and subvolume (in the Guardian
environment) or directory (in the OSS environment) as the compiler. In the
Guardian environment, the compiler searches for library_header_file using
the SSV search list. In the OSS environment, the compiler searches for
library_header_file using operands specified in the c89 utility -I flag.
section_list
is a parenthesized, comma-separated list of section names found in the specified
source file or library header file. Sections are created using the SECTION pragma,
which is discussed in SECTION on page 13-84.
This is an HP NonStop extension to the standard.
nolist
directs the compiler not to list the contents of the file or sections being included.
This is an HP NonStop extension to the standard.
newline
is the newline character that terminates the directive line.
Usage Guidelines
•
You can enter the INCLUDE directive on the command line or in the source text.
•
The INCLUDE directive specifies a pathname that the compiler searches before
looking in the usual places.
•
The compiler searches for files as follows:
File File Search
#include <library_header_file> The specified standard header file is
searched for in the location of the
compiler (see details in following bullets).
#include "source_file" The specified user-defined file is
searched for in the current default
Guardian volume and subvolume or OSS
working directory.
#include "subvolume.file" The specified user-defined file is
searched for in the current default
Guardian volume.