- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Windows 10
IDE
Visual Studio 19
Compiler
Intel(R) oneAPI DPC++ compiler
Toolkit
oneAPI Base Toolkit version 2021.1-beta09
Problem
By default, the toolkit doesn't define _DEBUG macro in debug mode. However, upon defining it, the linker will fail due to missing debug CRT symbols.
I can bypass this by using /MDd or /MTd as a command line argument. However, this would lead to erroneous SYCL runtime probably due to ABI issues with mismatching CRTs.
I can force the linker to link against sycld.lib and everything would work just fine.
I believe this is a tooling bug in debug mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
I tried the way you have described and yes you are right by default toolkit doesn't define _DEBUG micro.
And one thing I wanted you to suggest that when you define _DEBUG as 1 we have to set /LDd, /MDd, or /MTd compiler options. Otherwise, it will be undefined.
But when I tried enabling DEBUG feature I was able to compile the project but was failing at run time and when I give the sycld.lib path at the linking stage it was executing with correct results.
I can very much able to reproduce your issue and I also feel that it's a bug. So I am forwarding this issue to the concerned team.
Thank you for posting it to us.
Warm Regards,
Abhishek
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
I tried the way you have described and yes you are right by default toolkit doesn't define _DEBUG micro.
And one thing I wanted you to suggest that when you define _DEBUG as 1 we have to set /LDd, /MDd, or /MTd compiler options. Otherwise, it will be undefined.
But when I tried enabling DEBUG feature I was able to compile the project but was failing at run time and when I give the sycld.lib path at the linking stage it was executing with correct results.
I can very much able to reproduce your issue and I also feel that it's a bug. So I am forwarding this issue to the concerned team.
Thank you for posting it to us.
Warm Regards,
Abhishek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update for beta10.
Properly links to sycld.lib when _DEBUG is defined.
However, I still have to specify to use a debug version of the runtime library /MDd or /MTd as a compiler argument.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, using /MDd should set everything you need, that's the expected behavior.

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