Stack Exchange
OpenCL build log provides no information
My OpenCL kernel is not being built, clBuildProgram returns -11. However, when I try to read the build log using
//get build log
size_t len;
char *buffer;
clStatus = clGetProgramBuildInfo(program, device_list[0], CL_PROGRAM_BUILD_LOG, 0, NULL, &len);
buffer = (char *)malloc(len);
clStatus = clGetProgramBuildInfo(program, device_list[0], CL_PROGRAM_BUILD_LOG, len, buffer, NULL);
fprintf(stdout, "Kernel build log: %s\n", query_buffer);
free(buffer);

All I'm getting as output is
Kernel build log: OpenCL 1.2

For now I've resorted to copy-pasting my kernel code into a separate c-program and compiling, trying to find compile errors that way, but needless to say this is pretty tedious :P Does anyone know what's going on?
Fafner

Are you sure that you mean query_buffer and not buffer while printing log.

Ouch, I was afraid it was something like that. Thanks, that was it!

OK, this was merely a typo, printing the correct buffer solved the problem.
