c++visual-studio-codeintel-oneapisycl

CL/sycl.hpp not located by VS Code (ubuntu 22.04)


I am starting with SYCL and my code runs well. However in the VS Code editor,#include<CL/sycl.hpp> is showing error squiggles and I need to update the include path to get the auto-suggestions. However I am unable to locate where the file is. I did a normal installation sudo apt install intel-basekit to get SYCL on my machine.


Solution

  • I have exact same environment. You can see the steps in the video link that Varsha posted.

    But to make more direct, Right Click on Squiggly lines, edit include path. Either through GUI or click link to c_cpp_properties.json

    Add the following:

    "includePath": [
                    "${workspaceFolder}/**",
                    "/opt/intel/oneapi/compiler/2022.1.0/linux/include/**"
                ],