Intel® Fortran Compiler 19.0 Developer Guide and Reference
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:
In the directory of the source file that contains the include
In the current working directory
In the directories specified by compiler option I.
In the directory specified by compiler option -isystem (Linux* and macOS* only)
In the directories specified with environment variables CPATH (Linux* and macOS*) or INCLUDE (Windows*)
In the 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 compiler option I 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 compiler option -X or /noinclude.
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:
Example |
---|
// Linux* and macOS* ifort -X -I/alt/include newmain.f |
// Windows* ifort /noinclude /IC:\Project2\include newmain.f |