According to Khronos specs, it must be possible to specify as compiler option an include directory.
As far as I can see, the option does not interpret pathnames with spaces correctly, even if the pathname is enclosed in double quotes. When I replace the pathname (see below) by “C:\TEST”, no clang-error is reported.
Can you see if I do something wrong?
-I “c:\Users\Jan\Documents\Visual Studio 2008\Projects\triangularnbody\nbody-ring-test-opencl”
clang: Too many positional arguments specified!
Can specify at most 1 positional arguments: See: clang --help
I solved the problem for now by resorting to a windows-function (GetShortPathName()), introducing a platform-dependency:
_getcwd(buffer,sizeof(buffer)); int lenghth=GetShortPathName(buffer,buf2,sizeof(buf2)); sprintf(buffer,"%s -I %s",OPENCL_OPTIONS,buf2); int cl_build_err=clBuildProgram(clprog, 0, NULL, buffer, NULL, NULL);