- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I've installed the oneAPI base toolkit (2022.1), with the extensions for VS 2022.
But after trying to compile a sample project, or even the autogenerated one via New Project -> DPC++ -> Console Project, it fails to link:
2> Target "Link" in file "C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Platforms\x64\PlatformToolsets\Intel(R) oneAPI DPC++ Compiler 2022\Toolset.targets":
2> Task "SYCLLink"
2> C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\bin\dpcpp-cl.exe /Fe"C:\Users\fama\source\repos\Base_Vector_Add\x64\Debug\vector-add-usm.exe" "x64\Debug\vector-add-usm.obj" /Zi /WX- /MDd /nologo
2> dpcpp: : error : unable to execute command: program not executable
2> dpcpp: : error : linker command failed with exit code 1 (use -v to see invocation)
2> Done executing task "SYCLLink" -- FAILED.
How can I fix this problem?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
Could you please provide the following details so that we can reproduce the issue at our end?
1. The sub version of Visual Studio you are using? Example: VS 2022 17.0.0
2. The Operating system & its version you are using?
3. Could you please run the below commands to check the DPC++ compiler version and provide us with the screenshot of the output
"C:\Program Files (x86)\intel\oneAPI\setvars.bat"
dpcpp --version
4. Also, could you please confirm if you have followed the same steps to run the application as mentioned in the below link?
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Here's the informations you've requested:
- Microsoft Visual Studio Professional 2022 (64-bit) - LTSC 17.2 Version 17.2.8
- Windows 10 Pro 21H2 19044.2006
- Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\PROGRA~2\Intel\oneAPI\compiler\latest\windows\bin-llvm - Regarding your link, that's VS Code on Linux, I'm using VS 2022 on Windows
The procedure I've followed is:- Open VS 2022
- On the menubar, Extensions -> Intel -> Browse oneAPI code samples...
- Select 'Base Vector Add'
- Build solution
Maybe I should repair the oneAPI installation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Here's the information you've asked:
- Microsoft Visual Studio Professional 2022 (64-bit) - LTSC 17.2 Version 17.2.8
- Windows 10 Pro 21H2 19044.2006
- Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\PROGRA~2\Intel\oneAPI\compiler\latest\windows\bin-llvm - Your link is for VSCode on Linux, I use VS 2022 on Windows
The steps I've done are:- New Project -> DPC++ Console Application
- Inside the project properties I've enabled TBB
- Try to compile this single program:
#include <oneapi/tbb.h>
int main()
{}
For the samples, I've used the extension provided by Intel for VS 2022 to generate a sample project "Base Vector Add", but didn't work either.
I've also repaired the installation, but it didn't solve the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Here's the information you've asked:
- Microsoft Visual Studio Professional 2022 (64-bit) - LTSC 17.2 Version 17.2.8
- Windows 10 Pro 21H2 19044.2006
- Intel(R) oneAPI DPC++/C++ Compiler 2022.1.0 (2022.1.0.20220316)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\PROGRA~2\Intel\oneAPI\compiler\latest\windows\bin-llvm - Your link is for VSCode on Linux, I use VS 2022 on Windows
- The steps I've done are:
- New Project -> DPC++ Console Application
- Inside the project properties I've enabled TBB
- Try to compile this single program:
#include <oneapi/tbb.h>
int main()
{}
For the samples, I've used the extension provided by Intel for VS 2022 to generate a sample project "Base Vector Add", but didn't work either.
I've also repaired the installation, but it didn't solve the issue.
P.S.
That's the 3rd time I've posted this reply, as the forum displays my reply but after a refresh it's gone...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for providing the information.
Could you please try the below steps and let us know if you are able to run sample programs successfully using the command line?
1. Open "Intel oneAPI command prompt for Intel 64 for Visual Studio 2022" and execute the below command:
oneapi-cli
2. And please follow the steps provided in the below link.
Please let us know if it works.
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
thanks for your reply.
Unfortunately, it didn't work.
The sample project is created successfully, the program compiles but still fails during the linking phase.
The "getting started" link you've provided is for Linux users, I am not. I use Windows 10 and Visual Studio.
I wanted to add that on my personal workstation that I have at home, I had no issues with TBB, and I also didn't need to do anything else after installing the components via Intel oneAPI Online Installer.
I'll try to reinstall all the components and check if the problem persists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sorry for the inconvenience. For windows, you can refer to the below link for building and running a sample project using the command line:
Could you please try the steps mentioned in the link above and let us know if it works?
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
if I follow the steps of that link, it works.
Sadly, this doesn't solve my problem as I can't compile it inside Visual Studio.
I don't understand what kind of problem it has, maybe the environment doesn't initialize properly when creating a DPC++ project?
The real strange thing is that I can't reproduce this problem at home because on my PC I can compile everything without problems, but on my company's workstation, I can't.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It seems to be an Integration issue between Visual studio & Intel oneAPI toolkits.
So, could you please try uninstalling the Visual Studio and Intel oneAPI toolkits and re-install them?
Note: You need to install Visual Studio before installing Intel oneAPI Toolkits.
Please refer to the below links for more details.
https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit.html#gs.duokvg
https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit.html#gs.duors3
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sadly, reinstalling Intel oneAPI didn't work.
I'm sorry but reinstalling Visual Studio is not a solution for me, I can't lose hours because your tool simply doesn't work.
I'll see if it will be possible to use it via CMake, otherwise I'll simply use another library.
I don't understand why on my PC works flawylessly while at work doesn't, even after reinstalling it.
I even have the same extensions installed in both, the only difference is that at work I have VS 2017/2019/2022, while at home I only have VS 2022, but I'm not going to reinstall them to see if it's an issue or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We understand there is a problem with VS integration.
Could you please try with below steps and let us know what you have found so that we can investigate more your issue?
1. Press win+R on your keyboard.
2. Type cmd in the run application and press enter.
3. Run the following command in the command prompt to initilialize the oneAPI environment
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
4. Check the dpcpp version using the following command and let us know the output you have got.
dpcpp --version
5. Run the following command in the command prompt
oneapi-cli
6. Click on enter for the following commands
Create a project
cpp
Base: Vector Add
7. At the project destination, click on Create and Quit
8. Run the following commands in the command prompt
cd vector-add\src
dpcpp vector-add-buffers.cpp /EHsc
vector-add-buffers.exe
Please try the above steps and let us know where you have faced the problem with a complete error log or a screenshot of the output.
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Could you please provide an update on your issue?
Thanks and Regards,
Pendyala Sesha Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We assume that your issue is resolved. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks and Regards,
Pendyala Sesha Srinivas

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page