Include a header into kernel

I want to use functions from <wincrypt.h> header in my kernel so I should include it to my kernel.
From the openCL documentation I found out that I should use clBuildProgram with -I option to specify include directory so I’m trying to use it:
ret = clBuildProgram(program, 1, &device_id, “-I C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\”, NULL, NULL);
But I’m getting error 43: CL_INVALID_BUILD_OPTIONS.
What am I doing wrong?

It looks like the problem is in the spaces in the directory path.
When I specify “C:\ProgramFiles” the error code is 0 and everything’s fine but when the path is “C:\Program Files” I still get this error. Is there any way to solve it?

You can escape whitespace with backslash, e.g. “Program\ Files”.

You do realise that you can’t call host-side external libraries from inside kernels.

… Maybe (s)he wants to also add some of the relevant source to the .cl file as helper functions?..

Under XCode, when I want to include a header in my kernel I just use an “include” line as always, but specifying the whole path name, i.e.:

#include “/Developer/myprojs/thisproj/thisfile.h”