Lahey/GNU Fortran

-mod path1[;path2 ...]

Module Path

Compile only. Default: current directory

GFortran options: -J, -I

Specify -mod path1[;path2 ...] to instruct the compiler to search the specified directories for previously compiled LGF module files (.MOD). If source code containing a module is being compiled, the module .MOD and .OBJ files will be placed in the directory specified by path1 (the first directory specified).

When a program that uses a module is linked, the module's object file (or library name) must be provided on the command line.

Example

LF95 modprog mod.obj othermod.obj -mod ..\mods

In this example, the compiler searches ..\mods. Any module and module object files produced from modprog.f90 are placed in ..\mods.

See Also

-I
Linking Fortran 95 Modules