Recently I found that getting OpenCL working on a linux box(and possibly windows also) is quite challenging.
The NVIDIA website wasn’t much help, and there seemed to be a fair few sources that claimed that installing the CUDA Toolkit from Nvidia would be sufficient.
It did install the .so file at: /usr/lib/x86_64-linux-gnu/libOpenCL.so
(might vary depending on the type of install used. I installed using a .deb file)
Indicating that the library was partially available, however attempting to include the OpenCL headers and compiling in C/C++ programs would result in the compiler not recognising them.
After some research I found that the CUDA toolkit did not include the openCL headers in the /usr/include folder.
Conveniently, this could be resolved with the command:
sudo apt-get install opencl-headers
This added the CL folder to the include directory:
liang@liang-EX58-UD3R:~$ ls -la /usr/include/ |grep CL
drwxr-xr-x 2 root root 4096 Jun 19 23:45 CL
After this I was able to compile .cl programs using g++ and gcc.