Lahey/GNU Fortran

-i path1[;path2 ...]

Include Path

Compile only. Default: current directory

GFortran option: -I

Instruct the compiler to search the specified path(s) for Fortran INCLUDE files after searching the current directory and to search for ‘.mod’ files when previously compiled modules are required by a USE statement. Separate multiple search paths with a semicolon, not spaces. If a space appears as part of a pathname, the entire path must be enclosed in quotes.


LGF demo -i ..\project2\includes;..\project3\includes

In this example, the compiler first searches the current directory, then searches ..\project2\includes and finally ..\project3\includes for INCLUDE files specified in the source file DEMO.F90

See Also