Include <opencl cl.h=""> <OpenCl/cl.h> or so, depeding on the OpenCL SDK you're using. Notice that you need that if you're using anything OpenCL-related that's not completely wrapped inside OpenCV.