Before you first invoke the compiler, you need to be sure certain environment variables are set. These environment variables define the location of the various compiler-related components.
The product includes a batch file that you can run to set environment variables.
On Linux* OS and Mac OS* X, the file is a shell script called compilervars.sh or compilervars.csh.
On Windows* OS, the file is a batch file called compilervars.bat. The batch file called iclvars.bat will continue to be provided for compatibility.
The following information is operating system-dependent.
To source an environment script, enter one of the following on the command line:
source <install-dir>/bin/compilervars.sh <arg>
or
source <install-dir>/bin/compilervars.csh <arg>
If you want the script to run automatically, add the same command to the end of your startup file.
Sample .bash_profile entry for compilervars.sh:
# set environment vars for Intel C++ compiler
source <install-dr>/bin/compilervars.sh ia32
With some Linux* distributions, if you source compilervars.sh from your .bash_profile, the location of LIBRARY_PATH may not be set as you would expect. It may be necessary to source compilervars.sh after starting your terminal session. This affects the Intel C++ compiler (icpc) only.
Under normal circumstances, you do not need to run the batch file. The Intel C++ command-line window sets these variables for you automatically.
You will need to run the batch file if you open a command-line window instead of using the provided one or if you want to use the compiler from a script of your own.
The batch file inserts the directories used by the Intel C++ compiler at the beginning of the existing paths. Because these directories appear first, they are searched before any directories in the path lists provided by Windows OS. This is especially important if the existing path includes directories with files having the same names as those needed by Intel Fortran.
The batch file takes two arguments:
<install-dir>\bin\compilervars.bat <arg1> [<arg2>]
<arg1> is one of the following
ia32: Compiler and libraries for IA-32 architecture only
ia32_intel64: Compiler running on IA-32 architecture that generates code for Intel® 64 architecture; uses Intel® 64 architecture libraries
<arg2>, if specified, is one of the following:
If <arg2> is not specified, the script uses the version of Visual Studio that was detected during the installation procedure.
Copyright © 1996-2011, Intel Corporation. All rights reserved.