# Create the Executable Program

When you are ready to create an executable image of your application, use the options on the Build menu. You can:

- Compile a file without linking.
- Build a project or solution.
- Rebuild a project or solution.
- Batch build several configurations of a project.
- Clean a project or solution (which deletes all files created during the Build).
- Select the active solution and configuration.
- Edit the project configuration.

When you have completed your project definition, you can build the executable program.

When you select Build <projectname> from the Build menu (or Build toolbar), the integrated development environment (IDE) automatically updates dependencies, compiles and links all files in your project. When you build a project, the IDE processes only the files in the project that have changed since the last build and those files dependent on the changed files. The following example illustrates this.

### Note

To define the build order of projects, right-click on the solution and choose Properties > Project Dependencies.

Example: Assume you have multiple projects (A, B, and C) in a solution with the following defined dependencies:

- A depends on B
- B depends on C

If you build A, the build process verifies that B is up-to-date. During verification of B, C is also verified that it is likewise up-to-date. When either, or both, are determined to be out of date, the appropriate build operations will occur to update them. When C and B produce .lib or .dll output, the output of C is linked into B and the output of B is linked into A.

The Rebuild <project name> option forces a new compilation of all source files listed for the project.

You either can choose to build a single project, the current project, or multiple project configurations (using the Batch Build... option) in one operation. You can also choose to build the entire solution.

You can execute your program from the IDE using Debug > Start Without Debugging (Ctrl and F5) or Debug > Start (F5). You can also execute your program from the command line prompt.

## Compile Files in a Project

You can select and compile individual files in any project in your solution. To do this, select the file in the Solution Explorer view. Then, do one of the following:

- Select Compile from the Build menu (or Build toolbar).
- Right-click to display the pop-up menu and select Compile.

You can also use Compile from the Build menu (or Build toolbar) options when the source window is active and has input focus.

## Compilation Errors

When the compiler encounters an error in a file, compilation stops and the error is reported. You can change this default behavior and allow compilation to continue despite an error in the current file. When you do this, an error in the current file will cause the compiler to begin compiling the next file.

To enable Continue on errors behavior:

1. In Tools > Options > Intel Compilers and Libraries > IFORT Intel Fortran Classic for `ifort` or Tools > Options > Intel Compilers and Libraries > IFX Intel Fortran for `ifx`, select the General category.
2. Check Continue on errors and click OK.

To set the maximum number of errors to encounter before compilation stops, choose Configuration Properties > Fortran > Diagnostics > Error Limit.

Parent topic: Use Microsoft Visual Studio