How to Include Common File into OCL file!

Hi Everybody
One question confused me for a long time. Some common para was set in a common file which include some struct ,macro and so on. I need to include the common file into OCL file. But using #include “common.h” or #include “” will caused function clBuildProgram return 0xffffffc5. Does anyone have the experience to include the common file into the .cl file.


That should work fine. If it doesn’t, then you should check the path to the file and make sure it is relative to the built binary. (E.g., some build systems put your program in Debug/bin or something, so you need to make sure your included file is in that directory as well.) If it doesn’t work then you should file a bug against the vendor as that is supposed to be included. BTW – if you convert your error code to a signed int you will get a nice small negative number that you can use to compare against the header file.