opencl API : include headers to .cl file

Hi,

I wrote a kernel in a .cl file, but when I include a .h file, and run code,
I get ""file.h" not found".
so I read the opencl spec, and found that I have to add the path to the headers to my buildprogram API (5.4.3 of 1.0spec), so this is my code line:

ciErrNum = clBuildProgram(cpProgram, 0, NULL, "-I C:/Users/localcontrol/internship/OpenCV/cv/include", NULL, NULL);

but it doesn't work, the program crashes at this line,

is anyone seeing what could be the problem,
I really need help with this.
thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Headers to ,cl

Is there a reason you are specifying C: in your path to the header? Otherwise it looks as if you are using a standard unix path.

Dave