开发者

Gcc fails to recognize `-I../path`

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_wor开发者_高级运维ld.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?


Check if - in -I, -L, -l is not in some other language.

It seems like some unicode symbol, not ascii.

That's why they are not recognized as gcc options but source files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜