Intel® C++ Compiler 18.0 Developer Guide and Reference Supplement for Intel® System Studio 2018

Using compilervars File

Before you invoke the compiler component of the Intel® System Studio, 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.

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 up the Intel compiler environment with the following command:

The environment script file requires an architecture argument <arch> for the -arch option, which takes the following values:

The environment script file also takes a target platform argument <platform> for the -platform option, which can have the following values:

The default install path is /opt/intel/bin/ if the installation is conducted by the root user.

//# Examples

prompt>  source /opt/intel/bin/compilervars.sh -arch intel64 -platform linux  //for Linux targets

prompt>  source /opt/intel/bin/compilervars.sh -arch ia32 -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 the Intel® C++ Compiler 18.0 Developer Guide and Reference.

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:

The environment batch file requires a platform argument <platform> for the -platform option, which takes the following values: