error code +1?

Function clBuildProgram() returns an error code 1. Any idea what this means?

I think this error message indicates a syntax error in your kernel code, but I am not entirely sure.

I’m also getting this error code, but only when i’m debugging. If I’m executing the .exe file everything works just fine (with the same .cl files).

Does anybody know why this happens and how i can solve it.

I’m using Win7 64-bit Visual C++ Express.

I found the reason for getting error code 1 while debugging. It is due to a bug in my “read_program_source(…)” function which added some nonsense at the end of the file which caused the syntax error. I replaced my function with the function from oclUtils.lib “oclLoadProgSource(…)” and everything now works fine for me.

Hint:
In order to check the syntax of a .cl file use clc.exe which comes with ATI-Stream SDK.

Yep, it indicates an error in the code. For now, before the drivers are fixed, simply treat anything else than 0 as an error.

You can also call clGetProgramInfo() to get the build log at runtime. Very useful for dynamically generated code!