Intel® Fortran Compiler 17.0 Developer Guide and Reference

I

Specifies an additional directory for the include path.

Syntax

Linux and macOS:

-Idir

Windows:

/Idir

Arguments

dir

Is the directory to add to the include path.

Default

OFF

The default include path is used.

Description

This option specifies an additional directory for the include path, which is searched for module files referenced in USE statements and include files referenced in INCLUDE statements. To specify multiple directories on the command line, repeat the option for each directory you want to add.

For all USE statements and for those INCLUDE statements whose file name does not begin with a device or directory name, the directories are searched in this order:

  1. The directory containing the first source file.

    Note that if assume nosource_include is specified, this directory will not be searched.

  2. The current working directory where the compilation is taking place (if different from the above directory).

  3. Any directory or directories specified using the I option. If multiple directories are specified, they are searched in the order specified on the command line, from left to right.

  4. On Linux* and OS X* systems, any directories indicated using environment variable CPATH. On Windows* systems, any directories indicated using environment variable INCLUDE.

This option affects fpp preprocessor behavior and the USE statement.

IDE Equivalent

Visual Studio: General > Additional Include Directories (/I)

Preprocessor > Additional Include Directories (/I)

Eclipse: None

Xcode: Preprocessor > Additional Include Directories (/I)

Alternate Options

Linux and OS X: None

Windows: /include

See Also