Errors During the Build Process

Compiler and linker errors are displayed in the Build pane of the output window. If the Output window is not displayed, in the View menu, click Output.

To quickly locate the source line causing the error, follow these steps:

  1. Double-click the error message text in the Build pane of the output window.

    - or -

  2. Press F4. The editor window appears with a marker in the left margin that identifies the line causing the error. You can continue to press F4 to scroll through additional errors.

If you need to set different compiler options for some of your source files, you can highlight the source file name and select the Project menu, Settings item. Options set in this manner are valid only for the file you selected.

After you have corrected any compiler errors reported during the previous build, choose Build from the Build menu. The build engine recompiles only those files that have changed, or which refer to changed include or module files. If all files in your project compile without errors, the build engine links the object files and libraries to create your program or library.

You can force the build engine to recompile all source files in the project by selecting Rebuild All from the Build menu. This is useful to verify that all of your source code is clean, especially if you are using a foreign makefile, or if you use a new set of compiler options for all of the files in your project.

If your build results in Linker errors, be aware that the project type selected and the project settings in the Libraries category (see Categories of Compiler Options) determine the libraries linked against. Also, you can specify additional user-created libraries.

To view the include file and library directory paths in the visual development environment:

  1. In the Tools menu, click Options.
  2. Click the Directories tab.
  3. In the drop-down list for Show Directories For, select Include files and view the include file paths.
  4. In the drop-down list for Show Directories For, select Library files and view the library paths.
  5. Click OK if you have changed any information.

To view the libraries being passed to the linker in the visual development environment:

  1. If not already open, open your Project Workspace (File menu, Open Workspace).
  2. In the Project menu, click Settings.
  3. Click the Link tab
  4. In Link tab's Project Options box, type the following option:
    /verbose:lib
  5. Click OK. The next time you build the project, the list of libraries will be displayed with other build-related messages in the output pane (bottom of screen).

If you have trouble linking CXML libraries, see also Using CXML from Visual Fortran.

With the Professional and Enterprise Editions, if you have trouble linking IMSL libraries, specify the /imsl option and see Using the IMSL Libraries from Visual Fortran.

If you encounter linker errors, see Linker Diagnostic Messages and Error Conditions.

To view a description of build and run-time messages, see Error Messages or, in the visual development environment, highlight the error identifier (such as LNK2001) in the output pane and press F1.