Specifies a directory to add to the include path.
Windows:
General > Additional Include Directories
Preprocessor > Additional Include Directories
Preprocessor>Ignore Standard Include Path (/noinclude)
Linux: None
IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture
Linux: | None |
Windows: | /include:dir /noinclude |
dir | Is the directory to add to the include path. |
OFF | The default include path is used. |
This option specifies a directory to add to 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 include option for each directory.
To request that the compiler search first in the directory where the source file resides instead of the current directory, specify option assume source_include.
For all USE statements and for those INCLUDE statements whose file name does not begin with a device or directory name, the directories searched are as follows, in this order:
The directory containing the first source file (if assume source_include was specified, which is the default).
The current default directory where the compilation is taking place.
If specified, the directory or directories listed in the include option. The order of searching multiple directories occurs within the specified list from left to right
On Linux, the directories indicated in the compile-time environment variable FPATH. On Windows, the directories indicated in the environment variable INCLUDE.
On Linux, specifying -noinclude prevents the compiler from searching in /usr/include for files specified in an INCLUDE statement. You can specify the -Idir option along with this option. This option does not affect the fpp preprocessor behavior, and is not related to the Fortran 95/90 USE statement.
On Windows, specifying /noinclude (or /include or /I without a directory, or /X) prevents searching in the directory specified by the INCLUDE environment variable.
On Windows, specifying the /noinclude option negates previous /include:dir options.
/include | Linux: -I Windows: /I |
/noinclude | Linux: -X Windows: /X |