Build and Run a Sample Project Using Visual Studio Code
For Visual Studio Code Users, Install the Sample Browser Extension
- From Visual Studio Code, click on the Extensions logo in the left navigation.
- Locate the extension titledSample Browser for Intel oneAPI Toolkits, or visit https://marketplace.visualstudio.com/publishers/intel-corporation to browse available extensions.
- After the extension installs, close VS Code. The directions in the Build and Run a Sample section will show you how to launch VS Code so that the environment variable are set correctly.
Create a Project Using Visual Studio Code
- Navigate to the install directory and sourcesetvars.sh.
The command above assumes you installed to the default folder. If you customized the installation folder,source <install_dir>/setvars.shsetvars.shis in your custom folder. See here for more information on setvars.sh.
- Launch VSCode:code
- Click on the oneAPI button on the left navigation to view samples.
- A list of available samples will open in the left navigation.
- Select a sample. Instructions for how to build and run that sample will appear in a preview window.
- To build and run a sample, click the + to the right of the sample name.
- Create a new folder for the sample. The sample will load in a new window:
- Click README.md to view instructions for the sample.