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. For compiler and linker properties, there is usually a one to one correspondence between a compiler driver option and a property. Compiler (Fortran) 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.
The VS Fortran Support fully supports the Lahey/Fujitsu Fortran 95 compiler (LF95) and Lahey/GNU Fortran compiler (GFortran). All Projects in a Solution can be set to build with either compiler (compilers cannot be mixed within a Solution). This allows comparisons to be made by switching back and forth between the two, for the same source code (if compatible).
Select Tools > Options > Lahey Fortran > Build > Compiler. This setting will persist for all instances of Visual Studio thereon. Note that setting build options, as described below, take effect for the Current Compiler only (there is no crossover or synchronization between different compiler's options).
To set options that apply to a Project as a whole:
To set options that apply to an individual source file:
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.
|General||Contains properties that affect the entire project build.|
|Debugging||Contains properties used when launching the debugger.|
|Fortran||Categories under this node control preprocessing and compile-time options. Most of these options can be set for the project and for individual files.|
Categories under this node control linker options.
|Resources||Categories under this node control resource compiler options.|
|Build Events||Categories under this node can be used to define Pre-Build, Pre-Link, and Post-Build commands.|
|Custom Build Step||Categories under this node can be used to define a command to be executed at the start or end of the build.|
Note: Some of the categories and options will change depending on the current Compiler setting (see above).