Set the oneAPI Environment by Manually Running Setvars
Using Visual Studio Code* with Intel® oneAPI Toolkits
The oneAPI Environment can be automatically run using the VS Code
Environment and Launch Configurator for Intel oneAPI Toolkits
extension. For more information on extensions that work with Intel®
oneAPI Toolkits, see Using the Environment Set up and Launch
Configuration
Extension.As an alternative, you can manually run setvars:
- Navigate to the install directory and sourcesetvars.sh.source <install_dir>/setvars.shThe command above assumes you installed to the default folder. If you customized the installation folder,setvars.shis in your custom folder. See here for more information on setvars.sh.
- Launch VS Code:code
To run
setvars
for Windows*:- From a terminal window, runsetvars.bat."C:\Program Files (x86)\Intel\oneAPI\setvars.bat"The command above assumes you installed to the default folder. If you customized the installation folder,setvars.batis in your custom folder.
- From the same terminal window, launch VS Code:"C:\Users\<username>\AppData\Local\Programs\Microsoft VS Code\Code.exe"For Windows PowerShell* users, execute this command: .. code-block:: bashcmd.exe “/K” ‘“C:Program Files (x86)InteloneAPIsetvars.bat” && powershell’ code