stdinc

Option Type Default Value #pragma options C C++
-qoption stdinc STDINC x x

Syntax:

    -qstdinc | -qnostdinc 
    STDINC | NOSTDINC 

Purpose
Specifies which directories are used for files included by the #include <file_name> and #include "file_name" directives. The -qnostdinc option excludes the standard include directies (/usr/include for C and /usr/vacpp/include, /usr/include for C++) from the search.

Notes
If you specify -qnostdinc, the compiler will not search the directory /usr/include for C files, or the directories /usr/vacpp/include and /usr/include for C++ files, unless you explicitly add them with the -Idirectory option.

If a full (absolute) path name is specified, this option has no effect on that path name. It will still have an effect on all relative path names.

-qnostdinc is independent of -qidirfirst. (-qidirfirst searches the directory specified with -Idirectory before searching the directory where the current source file resides.

The search order for files is described in Directory Search Sequence for Include Files Using Relative Path Names.

The last valid #pragma options [NO]STDINC remains in effect until replaced by a subsequent #pragma options [NO]STDINC.

Example
To compile myprogram.c so that the directory /tmp/myfiles is searched for a file included in myprogram.c with the #include "myinc.h" directive, enter:

xlC myprogram.c -qnostdinc -I/tmp/myfiles


List of Batch Compiler Options and Their Defaults
Equivalent Batch Compile-Link and Incremental Build Options