-qidirfirst

Category

Input control

Pragma equivalent

None.

Purpose

Searches for user included files in directories that are specified by the -I option before searching any other directories.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-noidirfirst-.   
>>- -q--+-idirfirst---+----------------------------------------><

Defaults

-qnoidirfirst

Usage

This option only affects files that are included by the #include "file_name" directive or the -include option. This option has no effect on the search order for XL C/C++ or system header files. This option also has no effect on files that are included by absolute paths.

-qidirfirst is independent of the -qnostdinc option.

Predefined macros

None.

Examples

To compile myprogram.c and instruct the compiler to search for included files in /usr/tmp/myinclude first and then the directory in which the source file is located, use the following command:
xlc myprogram.c -I/usr/tmp/myinclude -qidirfirst


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us