Use the
Intel® oneAPI
DPC++/C++ Compiler
Intel® oneAPI
DPC++/C++
CompilerTo use the compiler with Microsoft Visual C++* (MSVC):
- Create a MSVC project, or open an existing project.
- InSolution Explorer, select the project(s) to build withIntel® oneAPI.DPC++/C++Compiler
- Open.
- In the left pane, expand theConfiguration Propertiescategory and select theGeneralproperty page.
- In the right pane, change the Platform Toolset to<compiler selection>. Alternatively, you can change the toolset by selecting . This sets whichever version of the compiler that you specify as the toolset for all supported platforms and configurations.For DPC++, selectFor C/C++, there are two toolsets: SelectIntel(R) oneAPI DPC++ Compilerto invokedpcpp-cl.Intel C++ Compiler <major version>(example 2021) to invokeicx, or selectIntel C++ Compiler <major.minor>(example 19.2) to invokeicl.
- To add options, go toand add new options to theAdditional Optionsfield. Alternatively, you can select options from Intel specific properties. Refer to complete list of options in the Compiler Options section in this documentation.
- Rebuild, using eitherfor a single project, or for a solution.
Switch Back to the MSVC Compiler
If your project is using the
Intel® oneAPI
, you can switch back to MSVC:
DPC++/C++
Compiler- Select your project.
- Right-click and selectfrom the context menu.
Verify Use of the
Intel® oneAPI
DPC++/C++ Compiler
Intel® oneAPI
DPC++/C++
CompilerTo verify the use of the
Intel® oneAPI
:
DPC++/C++
Compiler- Go to.
- SetSuppress Startup BannertoNo. ClickOK.
- Rebuild your application.
- Look at theOutputwindow.
You should see a message similar to the following when using the
Intel® oneAPI
:
DPC++/C++
CompilerIntel(R) oneAPI DPC++/C++ Compiler for applications running on XXXX, Version XX.X.X
Unsupported MSVC Project Types
The following project types are not supported:
- Class Library
- CLR Console Application
- CLR Empty Project
- Windows* Forms Application
- Windows Forms Control Library
Tips for Use
- Create a separate configuration for building withIntel® oneAPI:DPC++/C++Compiler
- After you have created your project and specified it as an Intel project, create a new configuration (for example,rel_intelcbased onReleaseconfiguration ordebug_intelcbased onDebugconfiguration).
- Add any special optimization options offered byIntel® oneAPIonly to this new configuration (for example,DPC++/C++Compilerrel_intelcordebug_intelc) through the project property page.
- Build withIntel® oneAPI.DPC++/C++Compiler