Invoking the Compiler from the Command Line

To open a command line window in Windows*, use the Start menu, choosing the specific compiler you are using. The image to the right shows how to select the Intel® C++ Compiler for 32-bit Applications for Windows*.

Use the keywords in the following table to invoke the specific compiler you are using:

To invoke this compiler...

Use this keyword...

Windows*

Linux*

Notes

Intel® C++ Compiler for 32-bit Applications

icl

icc | icpc

Linux: See the User's Guide for an explanation of the difference between icc and icpc.

Intel C++ Compiler for Itanium®-based Applications

icl

icc | icpc

Intel Fortran Compiler for 32-bit Applications

ifort

ifort

 

Intel Fortran Compiler for Itanium-based Applications

ifort

ifort

 

When invoking the Intel compiler Build Environment shell, or when your makefile does not include settings for environment variables, you need to first set environment variables by running the appropriate Intel compiler script. On Windows, the script is run automatically when launching the Intel compiler Build Environment shell. On Linux*, you need to manually run the script.

To run this script on Linux using the bash shell, enter one of the command lines in the following table:

For this Intel compiler for Linux... Enter the following command line...

C++ Compiler for 32-bit Applications

prompt>source /opt/intel_cc_80/bin/iccvars.sh

Fortran Compiler for 32-bit Applications

prompt>source /opt/intel_fc_80/bin/ifortvars.sh

C++ Compiler for Itanium®-based Applications

prompt>source /opt/intel_cc_80/bin/iccvars.sh

Fortran Compiler for Itanium-based Applications

prompt>source /opt/intel_fc_80/bin/ifortvars.sh

Note: If you use a C shell, replace the extension .sh in the above table with .csh.

The following examples show how to invoke the Intel C++ Compiler from the command line using a single compiler optimization option.

Invoking the Intel C++ Compiler

Windows:
prompt>icl -O3 myprog.cpp

Linux:
prompt>icc -O3 myprog.cpp

Note: -O3 and other compiler optimization options are explained later in this tutorial.