LF Fortran 95

Compiling and Linking a Project With Modules

Module created by another project in the solution

  1. Right-click on the References folder in the Application project and select "Add Reference...".
  2. Select the Projects tab and then the desired Module Library project and click OK.
  3. The module definition file(s) and library built by that Module Library project will be compiled and linked in when the Application project is built.

Compile with external module definition file(s)

To compile a project with existing external module definition file(s):

  1. Right-click on the References folder in the Application project and select "Add Reference...".
  2. Select the Browse tab and then browse to the desired file with the .mod extension and click OK.
  3. The reference will be named "Module Search Path".
  4. That folder will be searched for module definition files when the Application project is built.

Note that this only needs to be done once for a folder (the compiler will find all module definition files in that folder).

Alternatively, manually add an existing module search path to the project:

  1. Right-click on the project name in the Solution Explorer and select "Properties" from the context menu. The Project Property Pages will appear.
  2. Expand the "Configuration Properties" node, if it is not already expanded.
  3. Select the "Fortran" node, then select "Module/Include Paths".
  4. In the text box, add the path of the folder where the compiler should search for module definition files. If a pathname contains a space, the entire path should be enclosed in quotes. Multiple file names are separated by a semicolon.

Link with external module library or object file(s)

To link a project with an existing external library or object file:

  1. Right-click on the References folder in the Application project and select "Add Reference...".
  2. Select the Browse tab and then browse to the desired file and click OK.
  3. The library or object file will be linked in when the Application project is built.

Alternatively, manually add an existing library or object file to a project's link list:

  1. Right-click on the project name in the Solution Explorer and select "Properties" from the context menu. The Project Property Pages will appear.
  2. Expand the "Configuration Properties" node, if it is not already expanded.
  3. Select the "Linker" node, then select "Additional Linker Options"
  4. In the text box, add the pathnames of the libraries or object files you want to add to the link. If a pathname contains a space, the entire path/filename should be enclosed in quotes. Multiple file names are separated by one or more spaces.