Compilation problems

Hi,

I have writen a OpenCL kernel, it compile correctly in pure C++ and with the AMD OpenCL SDK…

The problem is that with the NVidia SDK it produce errors at compiles time and they sounds strange…

1 - It gives me the error line, and it is always “1”
2 - Errors sounds unrelated… I have isolated the code, re-read it… it sounds correct…

Does someone can help me ?

Thanks

I got the everything on 1 line error before. My programs also worked when they worked. When you clCreateProgramWithSource, are you passing a source array where every element is a single line of your source? I was doing this, because it seemed like the thing to do at the time, and in my host language, Java, there is a String method, string.split(’\n’) making it easy.

I then started using preprocessor commands, which MUST be on their own line, & nothing worked. I took out the split, leaving embedded \n’s, & no more 1’s.

Hope this helps.