I have a problem with linking and gcc, probably resulting from a stupid mistake on my side. Drawing from this post Header files linked to from header file not found, I tried the -I
option to inlcude header files, but gcc just does not seem to recognize the parameter.
~/Documents/projects/opencl/NVIDIA_GPU_Computing_SDK/src_l$ gcc opencl_hello_world.c –I../OpenCL/common/inc/CL/ –L/usr/local/cuda/lib –lOpenCL
gcc: –I../OpenCL/common/inc/CL/: No such file or directory
gcc: –L/usr/local/cuda/lib: No such file or directory
gcc: –lOpenCL: No such file or directory
In file included from opencl_hello_world.c:6:
../OpenCL/common/inc/CL/opencl.h:42:40: error: ../OpenCL/common/inc/CL/cl.h: No such file or directory
../OpenCL/common/inc/CL/opencl.h:43:43: error: ../OpenCL/common/inc/CL/cl_gl.h: No such file or directory
../OpenCL/common/inc/CL/opencl.h:44:47: error: ../OpenCL/common/inc/CL/cl_gl_ext.h: No such file or directory
../OpenCL/common/inc/CL/opencl.h:45:44: error: ../OpenCL/common/inc/CL/cl_ext.h: No such file or directory
When I input the command cd ../OpenCL/common/inc/CL/
it brings me to the right folder with the right header files in it.
What do I do wrong?