LF Fortran 95

Setting Build Options

In Visual Studio, compilation and linking are controlled by setting properties on a file or project. When a project is built, the properties are examined and compiler options are set. There is usually a one to one correspondence between a compiler option and a property. Build options can be set for all the files in a project using the project property page, or may be set for a single source file using the individual file property page.

To set options that apply to a Project as a whole:

Right-click on the project name in Solution Explorer and select "Properties" from the context menu that appears.

To set options that apply to an individual source file:

Right-click on the source file name in Solution Explorer and select "Properties" from the context menu that appears.

If the Solution Explorer is not visible you can make it visible by selecting it from the "View" pull down menu.

The project Property Pages dialog box will appear:

The pane on the left hand side of the property pages displays a series of categories. When a category node is selected, the property page for that category will appear. When a property on a page is selected, a pane in the lower right part of the property page displays the property name and a brief description for the property.

Fortran Options

Categories under this node control compile-time settings, and what sort of diagnostic information is produced. Many of the options in this folder are the same for project and individual file settings. However, some options are only appropriate for either project settings or file settings. An example would be the option to perform global runtime checking, which requires that all source files in the project be compiled with the option enabled.

  1. General contains settings that affect parameters like output names and paths, and what sort of thing the project will produce. This page also contains an "Additional Compiler Options" property, where compiler options that do not appear as a property may be set.
  2. Behavior controls compilation time default behavior, and runtime behaviors that might be built in to a program.
  3. Debug/Diagnostics controls the inclusion of debug information, and enables other sorts of runtime diagnostic checking.
  4. Exception Trapping controls whether a program will halt or proceed if certain numeric data processor (NDP) exceptions occur.
  5. Compiler Output controls what information and listing files are produced at compile time.
  6. Module/Include file paths are used to set default search paths for include and module files.
  7. Mixed Language allows the user to designate mixed language targets, and to generate object files suitable for mixed language static linking.
  8. Optimization provides both general and processor specific optimizations.
  9. Precision controls the default precision of variable types, and the runtime handling of intermediate results that might affect the accuracy of calculations that are sensitive to rounding errors.

Linker Options

Settings that affect linking the project appear under the 'Linker' node. These options allow specification of library search paths, which libraries are linked, and other linker related settings. Linker options that are not covered by a property may be set using the "Additional Linker Options" property. This folder will only appear if the project properties are being viewed.

See Also

Compiler and Linker Options