|
Follow these steps to invoke the Intel® C/C++ Compiler from the command line:
- Set up the Compiler’s build environment in a Terminal Command prompt:
$ source /opt/intel/cc/10.xxx/bin/iccvars.sh
- Invoke the compiler for the C source file as follows:
$ icc [options... ] inputfile(s)
- 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:
|