Summary
I got the above error when I tried to compile "vector-add-buffers.cpp" from the openmp-samples.
Version
2026.1
Environment
Windows
Steps to reproduce
Produce a Visual Studio solution with the supplied CMakeLists.txt of VectorAdd, and try to compile (inside Visual Studio).
Observed behavior
A lot of lines of the type: "identifier "cl_bitfield" is undefined" in cl.h. The first undefined is at cl.h line no. 48.
This is puzzling because cl.h contains the following lines:
40 typedef cl_ulong cl_bitfield;
typedef cl_ulong cl_properties;
typedef cl_bitfield cl_device_type;
typedef cl_uint cl_platform_info;
typedef cl_uint cl_device_info;
typedef cl_bitfield cl_device_fp_config;
typedef cl_uint cl_device_mem_cache_type;
typedef cl_uint cl_device_local_mem_type;
48 typedef cl_bitfield cl_device_exec_capabilities;
That is, "cl_bitfield" is defined before it is used.
Expected behavior
Document behavior you expect.
Summary
I got the above error when I tried to compile "vector-add-buffers.cpp" from the openmp-samples.
Version
2026.1
Environment
Windows
Steps to reproduce
Produce a Visual Studio solution with the supplied CMakeLists.txt of VectorAdd, and try to compile (inside Visual Studio).
Observed behavior
A lot of lines of the type: "identifier "cl_bitfield" is undefined" in cl.h. The first undefined is at cl.h line no. 48.
This is puzzling because cl.h contains the following lines:
40 typedef cl_ulong cl_bitfield;
typedef cl_ulong cl_properties;
typedef cl_bitfield cl_device_type;
typedef cl_uint cl_platform_info;
typedef cl_uint cl_device_info;
typedef cl_bitfield cl_device_fp_config;
typedef cl_uint cl_device_mem_cache_type;
typedef cl_uint cl_device_local_mem_type;
48 typedef cl_bitfield cl_device_exec_capabilities;
That is, "cl_bitfield" is defined before it is used.
Expected behavior
Document behavior you expect.