-qstdinc

Description

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 directories from the search path.

Syntax

Read syntax diagramSkip visual syntax diagram        .-stdinc---.
>>- -q--+-nostdinc-+-------------------------------------------><

See also #pragma options.

Notes

If you specify -qnostdinc, the compiler will not search the default search path directories 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 -I directory 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

Related information