Search
Support & Downloads
All of Support
This Category
Software Products
Performance Tools for Software Developers
Invoking the compiler from the command line

Follow these steps to invoke the Intel® C/C++ Compiler from the command line:

  1. Set up the Compiler’s build environment in a Terminal Command prompt:
    $ source /opt/intel/cc/10.xxx/bin/iccvars.sh

  2. Invoke the compiler for the C source file as follows:
    $ icc [options... ] inputfile(s)

  3. Invoke the compiler for the C++ source file as follows:
    $ icpc [options... ] inputfile(s)

The compiler will always use the options set in icc.cfg. The icc.cfg is located in the [intelc-install-dir]/bin directory.

Example:

$ icc -O2 hello.c
$ icpc -O2 hello.cpp

This applies to:
Intel® C++ Compiler for Linux*
Intel® C++ Compiler for Mac OS*

Solution ID: CS-025881
Date Created: 12-Apr-2007
Last Modified: 05-Jun-2007