I’m having a really hard time making anything with OpenCL since inconsequential things are causing CL compilation errors with useless log information. Even some of the example OpenCL code is failing to compile.
Sometimes taking out a comment or making sure the kernel is at the very very top of the file (no new lines) fixes the problem. Examples of log printouts are as such:
No kernels or only kernel prototypes found.
<program source>:1:1: error: expected identifier or '('
^
I’m on a MacOSX using Snow Leopard. To make it clear, I am talking about the CL code, not the C code. Is there some beginner mistake I’m just missing.
If you want, I can post some example code (though the one I’m talking about the the OpenCL VectorAdd example).
Up. I’ve got the same problem, changing inconsequential things are causing compilation errors. Without any modification, the code sometime happen to compile (or not). very frustrating.
does someone else got that problem ? fixed it ?
If I remember correctly, the MacOS implementation requires a newline at the end of each sub-string and does not assume every substring being a line on its own. As a consequence, any comment started with // will continue to the end of the program.