I have the following code, which builds and runs perfectly fine:
#include <stdio.h>
#include <CL/cl.h>
int main()
{
cl_platform_id platform_id;
puts("HELLO, WORLD!\n");
return 0;
}
Adding the following line to the beginning of MAIN raises an error, "Type cl_int could not be resolved":
The contents of <CL/cl.h> includes the following lines (which have no errors):
...
#include <CL/cl_platform.h>
...
typedef cl_uint cl_platform_info;
typedef cl_uint cl_device_info;
...
typedef cl_uint cl_program_build_info;
typedef cl_int cl_build_status;
...
The actual type 'cl_int' is defined in <CL/cl_platform.h>:
typedef unsigned __int16 cl_ushort;
typedef signed __int32 cl_int;
typedef unsigned __int32 cl_uint;
I do not understand why my code cannot resolve the type 'cl_int', when the header file it includes uses that type with no trouble at all.