There are two methods for verifying that the tools are installed correctly. Choose the one that works for you. Vector-Add is a simple sample used in both methods.
Microsoft Visual Studio
- Follow the instructions in the Get Started Guide
Command Line Browser (recommended)
Use the oneAPI sample browser:
- Create a folder where you want to store your sample. For example, C:\samples\vector-add
- Open a command window.
- Set system variables by running setvars. There are two variants for component directory and unified directory layouts.
a. Component Directory Layout: "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
Note: For Windows* PowerShell* users, enter this command:
cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\setvars.bat" && powershell'
b. Unified Directory Layout: "C:\Program Files (x86)\Intel\oneAPI\<toolkit-version>\oneapi-vars.bat"
Note: For Windows PowerShell* users, enter this command:
cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\<toolkit-version>\oneapi-vars.bat" && powershell'
The previous command assumes that you installed to the default folder. If you customized the installation folder, setvars | oneapi-vars is in your custom folder.
4. To launch the oneAPI Samples Browser utility, enter the following command: oneapi-cli
5. Press the up and down arrow keys to navigate to the sample: Create a project > cpp > Base: Vector Add.
6. To select the sample, press Enter.
7. Specify the project's location. The default location includes the path from where the utility was run and the project name.
8. Press Tab to select Create, and then press Enter.
9. Configure the build system and build the Vector Add sample as described in the sample documentation.
Explore more samples in the oneAPI Samples Catalog.