The compiler integrates into the following versions of Microsoft Visual Studio*:
For full functionality within Visual Studio, including debugging and development, Visual Studio Community Edition or higher is required. Visual Studio Express Edition allows only command-line builds. For all versions, Microsoft C++ support must be selected as part of the Visual Studio install. For Visual Studio 2017 and later, you must use a custom install to select this option.
You typically do not need to set the environment variables on Windows, as the compiler command-line window sets these variables for you automatically. If you need to set the environment variables, run the environment script as described in the suite-specific Get Started documentation.
The default installation directory (<install_dir>) is C:\Program Files (x86)\Intel\oneAPI.
C/C++
icx [options] file1 [file2...] [/link link_options]
SYCL
icx -fsycl [options] file1 [file2...] [/link link_options]
For example, the sample SYCL code provided in this guide is compiled with the following command:
icx -fsycl simple-sycl-app.cpp /Fesimple-sycl-app.exe
For more information about compiler drivers, visit Invoke the Compiler
Project Support for the Intel® DPC++/C++ Compiler in Microsoft Visual Studio
New Microsoft Visual Studio projects for DPC++ are automatically configured to use the Intel® oneAPI DPC++/C++ Compiler.
New Microsoft Visual C++* (MSVC) projects must be manually configured to use the Intel® oneAPI DPC++/C++ Compiler.
Use the Intel® DPC++/C++ Compiler in Microsoft Visual Studio
Exact steps may vary depending on the version of Microsoft Visual Studio in use.
Select Intel C++ Compiler <major version> (example 2021) to invoke icx.
Select Intel C++ Compiler <major.minor> (example 19.2) to invoke icl.
Alternatively, you can specify a compiler version as the toolset for all supported platforms and configurations of the selected project(s) by selecting Project > Intel Compiler > Use Intel oneAPI DPC++/C++ Compiler.
Select Compiler Version
If you have multiple versions of the Intel® oneAPI DPC++/C++ Compiler installed, you can select which version you want from the Compiler Selection dialog box:
Switch Back to the Microsoft Visual Studio C++ Compiler
If your project is using the Intel® oneAPI DPC++/C++ Compiler, you can choose to switch back to the Microsoft Visual C++ compiler:
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.
Follow the steps in Compile and Execute Sample SYCL Code to test your compiler installation.