I have a project which requires opencl. I have installed CUDA and openCL on my machine but when I 'make' my project the following error occurs:
CL/cl.h: No such file or directory
I know that the i can create a hard link (in my unix (ubuntu) system) to fix the problem:
ln -s /usr/include/nvidia-current/CL
But i consider this a quick fix and not the correct solution. I would like to handle this in my makefile (i guess) so that a simple "make" command would compile. How could I do this?
You need to pass an appropriate -I option to the compiler (by setting CPPFLAGS or CFLAGS, for example). -I/usr/include/nvidia-current
sounds like it'd work.
I saw this thread from compile opencl program using CL/cl.h file
I installed 7.5 and added below link in /usr/include, it works for my opencl program. looks like CUDA forget to implement this link after the installation.
ln -s /usr/local/cuda-7.5/include/CL /usr/include
Are you using Ubuntu or Debian distro? Then now you can use this package:
sudo apt-get install opencl-headers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With