LF Fortran 95

-MOD dir1[;dir2 ...]

Module Path

Compile only. Default: current directory

Specify -mod dir to instruct the compiler to search the specified directory for previously compiled LF95 module files (.MOD). If source code containing a module is being compiled, the module .MOD and .OBJ files will be placed in the first directory specified by dir.

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;..\othermods

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

Visual Studio Property

The -mod option corresponds to the Fortran|Module/Include Paths|Module Path property. This property can be set on the property page for the project or source file.

See Also

Linking Fortran 95 Modules

Setting Build Options