The Intel® C++ Compiler compiles C and C++ source files for Intel® 64 and IA-32 architectures. You can also use the compiler to create applications targeting Intel® Many Integrated Core Architecture (Intel® MIC Architecture) and Intel® Graphics Technology.
Start using the compiler from the command line or within Microsoft Visual Studio*.
Prerequisites
You must have a version of Microsoft Visual Studio* installed to use the compiler.
The compiler integrates into the following versions of Microsoft Visual Studio*:
Visual Studio* 2015
Visual Studio* 2013
Visual Studio* 2012
Visual Studio* 2010
You typically do not need to set the environment variables on Windows* OS, as the compiler command-line window sets these variables for you automatically. But if you need to set the environment variables, run the environment script as described in the edition-specific Getting Started documentation.
Using the Command Line
Follow these steps to invoke the compiler from the command line:
Open a command prompt.
Windows 8.x and Windows 10
Under the Intel Parallel Studio XE 2016 product group, select a compiler command prompt.
Other versions of Windows*
Open the Start menu and under Intel Parallel Studio XE 2016> Compiler and Performance Libraries> Command prompt with Intel Compiler, select a build environment.
Invoke the compiler as follows:
icl [options... ] inputfile(s) [/link link_options]
Use the command
icl /help
to display all available compiler options.
Using Microsoft Visual Studio*
Building a Binary
To use the Intel® compiler:
Launch Microsoft Visual Studio*.
Open an existing project or solution.
Select Project> Intel Compiler> Use Intel C++.
Click OK in the Confirmation dialog box. This configures the solution to use the Intel® C++ Compiler.
Visual Studio 2010: you can use Project> Properties General> Platform Toolset to select the Intel® C++ Compiler. This method is equivalent to using the Use Intel C++ menu item, except that you can make the selection in individual build configurations.
Select Build> Rebuild Solution.
The results of the compilation display in the Output window.
Setting Compiler Options
Select Project> Properties. The Property Page for your solution appears.
Locate C/C++ in the list and expand the heading.
Step through the available properties to select your configuration.
Switching to the Microsoft Visual Studio* C++ Compiler
If you are using the Intel® C++ Compiler, you can switch to the Visual C++ Compiler at any time by doing the following:
Launch Microsoft Visual Studio* and open a solution or project.
Select Project> Intel Compiler> Use Visual C++.
This action updates the solution file to use the Microsoft Visual Studio C++ compiler. All configurations of affected projects are automatically cleaned unless you select Do not clean project(s). If you choose not to clean projects, you will need to rebuild updated projects to ensure all source files are compiled with the new compiler.
Switching to the Intel compiler
To switch to the Intel compiler:
Launch Microsoft Visual Studio*, and open a solution or project.
Select Project> Intel Compiler> Use Intel C++.
Click OK in the Confirmation dialog box. This configures the solution to use the Intel C++ compiler.
Select Build> Rebuild Solution.
Start Optimizing Your Code
The compiler comes with several options to help you optimize the performance of your application. To help you get started, use the Performance Guide to learn how to optimize your code. The Performance Guide is an interactive tool that provides suggestions for introducing performance improvements in your C++ application.
Note: The Performance Guide requires that you have a properly licensed version of Intel® VTune™ Amplifier, supplied with the Professional Edition, on your system.
To start the Performance Guide, do the following:
Launch Microsoft Visual Studio*.
Open or create a Visual Studio solution in the Solution Explorer pane.
Select Tools> Intel Compiler> Start Performance Guide
Follow the instructions in the wizard.
For more information, see the Performance Guide section in the compiler User and Reference Guides.
Documentation and Resources
Document | Description |
---|---|
Samples | Online Intel® C++ Compiler code samples - https://software.intel.com/en-us/code-samples/intel-c-compiler |
The Intel® Compiler documentation contains information on:
| |
Documentation for the Intel® C++ Compiler on the Intel® Developer Zone. | |
Other help | You can access general help for compiler options by entering If you have a supported version of Microsoft Visual Studio installed, you can access the compiler documentation from the Help menu. |