6 Replies Latest reply on Jun 13, 2011 10:38 AM by lantonov

    trouble with including files

    lantonov

      I am having trouble getting #include to work in a kernel on APP 2.4. From the build output I can see that the kernel is being compiled in a temp foder. I get the same error from the AMD OpenCL compiler for both the GPU (4670 HD) and the CPU. The program builds for an NVIDIA GPU, by simply having the include file next to the .cl kernel file.

      I have tried passing the -I dir parameter to clBuildProgram, with both the executable folder and with a very simple path - d:\\. I have also tried including the full path in the #include statement, but it still gives the same error.

      I get the same result on two different computers with APP 2.4.

      Has anybody a verified method of including files from their kernel files?

      BUILD LOG ************************************************ H:\!WITHO~1\Lubo\AppData\Local\Temp\OCL410B.tmp.cl(5): catastrophic error: cannot open source file "saxs_common.cl" #include "saxs_common.cl" ^ 1 catastrophic error detected in the compilation of "H:\!WITHO~1\Lubo\AppData\Local\Temp \OCL410B.tmp.cl". Compilation terminated. VC/INCL ************************************************ ERROR: clBuildProgram(-11)