Pragma equivalent
#pragma options [no]stdinc
Purpose
Specifies whether the standard include directories
are included in the search paths for system and user header files.
When
-qstdinc is
in effect, the compiler searches the following directories for header files:
- The directory specified in the configuration file
for the XL C header files (this is normally /usr/vacpp/include/)
or by the -qc_stdinc option
- The directory specified in
the configuration file for the XL C and C++ header files (this is normally /usr/vacpp/include/)
or by the -qcpp_stdinc option
- The directory specified in the configuration file for the system header
files (this is normally /usr/include/), or by the -qc_stdinc and -qcpp_stdinc optionsor
by the -qgcc_c_stdinc and -qgcc_cpp_stdinc options
When
-qnostdinc is in effect, these directories are excluded
from the search paths. The only directories to be searched are:
- directories in which source files containing #include "filename" directives
are located
- directories specified by the -I option
- directories specified by the -qinclude option
Syntax
.-stdinc---.
>>- -q--+-nostdinc-+-------------------------------------------><
Usage
The search order of header files is described
in Directory search sequence for include files.
This option only
affects search paths for header files included with a relative name; if a
full (absolute) path name is specified, this option has no effect on that
path name.
The last valid pragma directive remains in effect until
replaced by a subsequent pragma.
Examples
To compile
myprogram.c so
that
only the directory
/tmp/myfiles (in
addition to the directory containing
myprogram.c) is searched
for the file included with the
#include “myinc.h” directive,
enter:
xlc myprogram.c -qnostdinc -I/tmp/myfiles