I'm getting my feet wet with OpenCL. I'm sure this problem is not specific to OpenCL, however.
the top of my main file looks like:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <OpenCL/opencl.h>
// some code
cl_device_id device_id; //declaring a device id gives no errors
int err = clGetDeviceIDs(NULL, CL_DEVICE_TYPE_GPU, 1, &device_id, NULL);
//the above API call does give an error.
I'm doing this on Snow Leopard. I can build and run Apple's examples using XCode. I can also compile and run NVIDIA's sample code by running make.
How do I properly compile my code without using XCODE?