Before you invoke the compiler component of the Intel® System Studio (ISS) you must set certain environment variables that define the location of compiler-related components.
The Intel® C++ Compiler includes the compilervars
scripts that you can run to set environment variables.
- On Linux*, the file is a shell script called compilervars.sh or compilervars.csh.
- On Windows*, the file is a batch file called compilervars.bat.
Note
Using the compilervars script does not set the environment variables for the shared libraries used by your application. You must set the LD_LIBRARY_PATH environment variable on your target system.
The following information is operating system dependent.
On Linux* Host Systems
Set the environment variables before using the compiler. You use the source command to execute the shell script compilervars.sh or compilervars.csh.
//Syntax: source /<install-dir>/bin/compilervars.sh -arch <arch> -platform <platform>
The environment script file requires an architecture argument <arch> for the -arch option, which takes the following values:
intel64
: Compiler and libraries for Intel® 64 architecture-based host systemsia32
: Compiler and libraries for IA-32 architecture-based host systems
The environment script file also takes a target platform argument <platform> for the -platform option, which can have the following values:
linux
: sets environment variables for the compiler and libraries for Linux targets only. This is the default target platform. So if the -platform option is not used, the target platform is assumed to be Linux.android
: sets environment variables for the compiler and libraries for Android targets only.
The default install path is /opt/intel/system_studio_2015.x.y/bin/ if the installation is conducted by the root user, where x.y is the version of the build package.
//# Examples: (assuming <install-dir> is /opt/intel/system_studio_2015.x.y/) prompt> source /opt/intel/system_studio_2015.x.y/compilervars.sh -arch ia32 -platform linux //for Linux targets prompt> source /opt/intel/system_studio_2015.x.y/compilervars.sh -arch intel64 -platform android //for Android targets
On Windows* Host Systems
Under normal circumstances, you do not need to run the compilervars.bat batch file. The Intel® C++ command-line window sets these variables for you automatically.
For information on using the command-line window see Using the Intel® Command-Line Window.
Note
You need to run the batch file if a command-line window is opened without using one of the provided menu items in the Start menu, 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*. This is especially important if the existing path includes directories with files having the same names as those needed by the Intel® C++ Compiler.
If needed, you can run compilervars.bat each time you begin a session on Windows* systems by specifying it as the initialization file with the PIF Editor.
The syntax for using the compilervars
batch file is as follows:
> compilervars.bat -arch <arch> -platform <platform>
The environment batch file requires an architecture argument <arch> for the -arch option, which takes the following values:
intel64:
Compiler and libraries for Intel® 64 architecture-based host systemsia32
: Compiler and libraries for IA-32 architecture-based host systems
The environment batch file requires a platform argument <platform> for the -platform option, which takes the following values:
linux:
sets up variables for Linux* targetsandroid:
sets up variables for Android* targets