Using the Compiler and Linker from the Command Line

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:

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:

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.

Note iconNote

Windows systems support characters in Unicode* (multibyte) format; the compiler will process file names containing Unicode* characters.


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.