Invoking the Intel® Fortran Compiler

The command to invoke the compiler is ifort.

Requirements Before Using the Command Line

On Linux* and Mac OS* systems, you need to set some environment variables to specify locations for the various components prior to using the command line. The Intel Fortran Compiler installation includes a .bat file that you can run to set environment variables. For more information, see Using the ifortvars File to Specify Location of Components.

On Windows* systems, you typically do not need to set any environment variables prior to using the command line. Each of the Intel® Fortran Compiler variations has its own Intel Compiler command-line window, available from the Intel Fortran program folder. This window has the appropriate environment variables already set for the command-line environment.

Using the ifort Command from the Command Line

Use the ifort command either on a command line or in a makefile to invoke the Intel Fortran compiler. The syntax is:

ifort [options] input_file(s)

For a complete listing of compiler options, see the Compiler Options reference.

You can specify more than one input_file, using a space as a delimiter. See Understanding Input File Extensions.

For more information on ifort syntax, see Syntax for the ifort Command.

Note

For Windows and Mac OS* systems, you can also use the compiler from within the integrated development environment.

You can use the command-line window to invoke the Intel Fortran Compiler in a number of ways, detailed below.

Using makefiles from the Command Line

Use makefiles to specify a number of files with various paths and to save this information for multiple compilations. For more information on using makefiles, see Using Makefiles to Compile Your Application.

Using the devenv command from the Command Line (Windows only)

Use devenv to set various options for the integrated development environment (IDE) as well as build, clean, and debug projects from the command line. For more information on the devenv command, see the devenv description in the Microsoft* Visual Studio* documentation.

Using a .bat file from the Command Line

Use a .bat file to consistently execute the compiler with a desired set of options. This spares you retyping the command each time you need to recompile.