Include files are brought into the program with the #include preprocessor directive or the INCLUDE statement. To locate such included files, the compiler searches by default for the standard include files in the directories specified in the INCLUDE environment variable. In addition, you can specify the compiler options, -I and -X.
You can use the -I option to indicate the location of include files. To prevent the compiler from searching the default path specified by the INCLUDE environment variable, use -X option.
You can specify these options in the configuration files, ifc.cfg for IA-32 or efc.cfg for Itanium-based applications or in command line.
Included files are brought into the program with a #include preprocessor directive or a Fortran INCLUDE statement. Use the -Idir option to specify an alternative directory to search for include files.
Files included by the Fortran INCLUDE statement are normally referenced in the same directory as the file being compiled. The -I option may be used more than once to extend the search for an INCLUDE file into other directories.
Directories are searched for include files in this order:
directory of the source file that contains the include
directories specified by the -I option
current working directory
directories specified with the INCLUDE environment variable
Use the -X option to prevent the compiler from searching the default path specified by the INCLUDE environment variable.
You can use the -X option with the -I option to prevent the compiler from searching the default path for include files and direct it to use an alternate path. For example, to direct the compiler to search the path /alt/include instead of the default path, do the following:
IA-32 applications:
prompt>ifc -X -I/alt/include newmain.f
Itanium(TM)-based applications:
prompt>efc -X -I/alt/include newmain.f