The ifort command is used to compile and link your programs from the command line.
You can either compile and link your projects in one step with the ifort command, or compile them with ifort and then link them as a separate step.
In most cases, you will use a single ifort command to invoke the compiler and linker.
You can use the ifort command in either of two windows:
Your own terminal window, in which you have set the appropriate environment variables by executing the file called compilervars.sh or compilervars.csh (Linux* OS and Mac OS* X) or compilervars.bat (Windows* OS). This file sets the environment variables such as PATH. By default, the compilervars file is installed in the \bin directory for your compiler. For more information, see Using the compilervars File to Specify Location of Components.
On Windows operating systems, the supplied Fortran command-line window in the Intel® Fortran program folder, in which the appropriate environment variables in compilervars.bat are preset.
The ifort command invokes a driver program that is the actual user interface to the compiler and linker. It accepts a list of command options and file names and directs processing for each file.
The driver program does the following:
Calls the Intel® Fortran Compiler to process Fortran files.
Passes the linker options to the linker.
Passes object files created by the compiler to the linker.
Passes libraries to the linker.
Calls the linker or librarian to create the executable or library file.
You can also use ld (Linux OS and Mac OS X) or link (Windows OS) to build libraries of object modules. These commands provide syntax instructions at the command line if you request it with the /? or /help option.
Theifort command automatically references the appropriate Intel Fortran Run-Time Libraries when it invokes the linker. Therefore, to link one or more object files created by the Intel Fortran compiler, you should use the ifort command instead of the link command.
Because the driver calls other software components, error messages may be returned by these other components. For instance, the linker may return a message if it cannot resolve a global reference. The -watch (Linux OS and Mac OS X) or /watch (Windows OS) command-line option can help clarify which component is generating the error.
Windows systems support characters in Unicode* (multibyte) format; the compiler will process file names containing Unicode* characters.
Copyright © 1996-2010, Intel Corporation. All rights reserved.