User and Reference Guide for the Intel® Fortran Compiler 14.0
Include files are brought into a program with the #include preprocessor directive or a Fortran INCLUDE statement.
Directories are searched for include files in this order:
Directory of the source file that contains the include
Current working directory
Directories specified by the I option
Directory specified by the -isystem option (Linux* OS and OS X* systems only)
Directories specified with the CPATH (Linux OS and OS X) or INCLUDE (Windows OS) environment variable
Standard system directories
The locations of directories to be searched are known as the include file path. More than one directory can be specified in the include file path.
You can use the I compiler option to indicate the location of include files (and also module files).
To prevent the compiler from searching the default path specified by the CPATH or the INCLUDE environment variable, use the -X or /noinclude option.
You can specify these options in the configuration file, ifort.cfg, or on the command line.
For example, to direct the compiler to search a specified path instead of the default path, use the following command line:
ifort -X -I/alt/include newmain.f (Linux OS and OS X) ifort /noinclude /IC:/Project2/include newmain.f (Windows OS)