Roman Kagan
Roman Kagan

Reputation: 10626

How can I compile Open CL on Mac OS X 10.6.3?

I was able to follow instructions and compiled CUDA 3.0 but cannot compile OpenCL that goes with it on Mac OS X 10.6.3?

Upvotes: 8

Views: 8505

Answers (2)

Jonathan Lisic
Jonathan Lisic

Reputation: 1840

I beleive nVidia under OpenCL suggests you just use the Apple drivers it provides by default. To compile an OpenCL program through gcc on OS X you simply use:

gcc -o foo foo.c -framework OpenCL

Upvotes: 25

Kendall Hopkins
Kendall Hopkins

Reputation: 44124

Take a look at clBuildProgram in http://www.khronos.org/files/opencl-quick-reference-card.pdf. I believe the program must be compiled for each graphics card with you would like to target, much like each CPU architecture.

Upvotes: 0

Related Questions