LF Fortran 95  

Building Your First Fortran 95 Project

Now that Fortran 95 and the Visual Studio development environment are installed, you are ready to create your first project. This section contains step-by-step instructions for creating a project and building the DEMO.F90 example provided in the installation.

  1. Select the File pull down menu, move the mouse over "New" and then over "Project" and click on it. This brings up the New Project dialog box.
  2. Move the mouse over the left window pane (entitled "Installed Templates") and and select "LF Fortran".
  3. Move the mouse to the center window pane and select the "Empty Project" template.
  4. Type in the name "Demo" for the project in the "Name:" textbox.
  5. Make sure you have the desired location for your project specified in the "Location:" textbox.
  6. Click the OK button.
  7. An empty project is created and is reflected in the Solution Explorer window (If Solution Explorer is not visible, you can make it visible by selecting it from the View pull down menu).

  8. Select the Project pull down menu, move the mouse over "Add Existing Item..." and left-click on it. This brings up the "Add Existing Item..." dialog box.
  9. Navigate to the Win32\Examples subdirectory in the Lahey-Fujitsu Fortran installation directory (by default <Program Files>\Lahey-Fujitsu Fortran\<version>). Select the Demo.f90 file.
  10. The Solution Explorer window should now show the Demo.F90 source file.

  11. To compile and execute the program in one step, select the Debug pull down menu and choose Start Without Debugging.
  12. The program will then compile, and a console will appear with the program output in it.

    When the program stops execution, the console disappears.

Congratulations! You have just created and run your first Fortran Visual Studio application!