- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am attempting to compile and run the sample program provided at https://oneapi-src.github.io/DPCPP_Reference/model/sample-program.html
I encounter multiple issues with this code.
Firstly, the line:
#include <CL/sycl.hpp>
gives a compile error that the header file is not known. It had to be changed to:
#include <sycl/sycl.hpp>
Subsequently, attempting to compile the code results in multiple errors. A common error seems to be in "accessor.hpp" file:
#include <CL/__spirv/spirv_types.hpp>
The reported error is:
Error 'CL/__spirv/spirv_types.hpp' file not found with <angled> include; use "quotes" instead windows C:\Program Files (x86)\Intel\oneAPI\compiler\2023.0.0\windows\include\sycl\accessor.hpp(11,10): 1
Is there a way to fix this compile/build error? Please let me know if any additional information is needed to get the code up and running.
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I added C:\Program Files (x86)\Intel\oneAPI\compiler\2023.0.0\windows\include\sycl to "Additional Include directories" and the above problems go away. However, now, the following error is obtained:
Error static assertion failed due to requirement '!std::is_same<sycl::detail::auto_name, sycl::detail::auto_name>::value': No kernel name provided without -fsycl-unnamed-lambda enabled! windows C:\Program Files (x86)\Intel\oneAPI\compiler\2023.0.0\windows\include\sycl\kernel.hpp(44,3): 1
Could you please point me to a reference where a sample compilation/build example is provided?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was able to solve the problem. It was needed of me to set /fsycl in C/C++ -> DPC++ tab of Visual Studio project properties.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
Glad to know that your issue is resolved.
Thanks for sharing the solution with us. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.
Thanks & Regards,
Varsha

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