Invoking the Compiler

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*

Intel® C++ Compiler for 32-bit Applications

icl

icc

Intel C++ Compiler for Itanium®-based Applications (on both IA-32 and Itanium-based systems)

ecl

ecc

Intel Fortran Compiler for 32-bit Applications

ifl

ifc

Intel Fortran Compiler for Itanium-based Applications (on both IA-32 and Itanium-based systems)

efl

efc

When invoking the Intel compiler from the command line, 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 command line. 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>. /opt/intel/compiler70/ia32/bin/iccvars.sh

Fortran Compiler for 32-bit Applications

prompt>. /opt/intel/compiler70/ia32/bin/ifcvars.sh

C++ Compiler for Itanium®-based Applications

prompt>. /opt/intel/compiler70/ia64/bin/eccvars.sh

Fortran Compiler for Itanium-based Applications

prompt>. /opt/intel/compiler70/ia64/bin/efcvars.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 for 32-bit Applications

prompt>icl -O2 myprog.cpp

Invoking the Intel C++ Compiler for Itanium®-based Applications

prompt>ecl -O2 myprog.cpp

-O2 and other compiler optimization options are explained later in this tutorial.