How to see build information in opencl c++

To get the build information I have added the cl::STRING_CLASS log = program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(); code to my project. But it gives a error message. What is the problem with it.


If you’re using a modern C++ compiler with the standard library (“std”), you should use std::string instead of cl::string. I think they only put cl::string and cl::vector in there for older compilers.