-qstdinc, -qnostdinc (-nostdinc, -nostdinc++)
Category
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 /opt/ibm/xlC/13.1.2/include/) or by the -isystem (-qc_stdinc) option
- The directory specified in the configuration file for the XL C and C++ header files (this is normally /opt/ibm/xlC/13.1.2/include/) or by the -isystem (-qcpp_stdinc) option
- The directory specified in the configuration file for the system header files or by the -isystem (-qgcc_c_stdinc or -qgcc_cpp_stdinc) option.
When -nostdinc++ or -nostdinc (-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 -include (-qinclude) option
Syntax
>>-+- -nostdinc++-+-------------------------------------------->< '- -nostdinc---'
.-stdinc---. >>- -q--+-nostdinc-+-------------------------------------------><
Defaults
-qstdinc
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.
Predefined macros
None.
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 -nostdinc -I/tmp/myfiles