2

I've included an OpenCL kernel (.cl file) in my OS X framework, and I'm able to reference it from one of my implementation (.m) files.

However, when I compile, I get the following error, related with the kernel:

openclc: error: cannot specify -o when generating multiple output files

This error appears once for every architecture found in the OPENCL_ARCHS build option. I've tried to leave all but one architecture (gpu_64 or gpu_32, tried both), however the error persists.

I went through two examples offered by Apple (Hello World and n-Body simulation, both of which compile and run fine on my system), looking for any special build options, but I failed to find any.

Any thoughts?

Thanks.

EDIT: Added Xcode7 tag, as I am working in Xcode 7 Beta.

insys
  • 1,288
  • 13
  • 26
  • You havent put any relevant code to reproduce the problem, you say that it does not compile. But what code are you trying to compile? What steps can we follow to reproduce the same issue? – DarkZeros Sep 01 '15 at 17:52
  • Thanks for the comment. Both kernel and host code are straight out of this: http://www.cedricnugteren.nl/tutorial.php?page=3 (and the relevant Github code), with only minor changes to some pointers. The code compiles/runs fine (also checked by including the kernel in the source file, which compiles perfectly fine). The problem is in compiling/including the kernel as a separate file, that is why I didn't include any code. – insys Sep 01 '15 at 19:20
  • @insis Have you solved the problem? – Yoav Apr 11 '16 at 13:07
  • Nope, I went with including the kernel in the source file. – insys Apr 19 '16 at 13:45

0 Answers0