Reputation: 2037
I am going to compile a chunk of codes which needs OpenCL 1.2. As I understood, nVIDIA has released OpenCL 1.2 driver. I have installed the latest CUDA Toolkit which is version 7.0. But when I compiled then code, I got errors like:
Error 9 error LNK2001: unresolved external symbol clReleaseDevice C:\Users\???\Downloads\FireRaysSDK-1.0\FireRaysSDK-1.0\App\CLW64.lib(CLWParallelPrimitives.obj) App
Error 7 error LNK2001: unresolved external symbol clRetainDevice C:\Users\???\Downloads\FireRaysSDK-1.0\FireRaysSDK-1.0\App\CLW64.lib(CLWContext.obj) App
After that I download the header files from khronos website for OpenCL 1.2. Now, it compiles but I am getting unresolved external link
to these functions as their implementation is not in OpenCL.lib
.
Is there any OpenCL.lib
that I can use to compile OpenCL 1.2 codes? Is there any way to get their implementation from DLL files? Because as I know nvidia has added the opencl 1.2 support to its driver.
Upvotes: 2
Views: 1539
Reputation: 9925
You are correct that NVIDIA now provide OpenCL 1.2 support in their latest drivers, but the CUDA 7.0 SDK was released sometime before these drivers were shipped, and so may not contain OpenCL 1.2 headers or libraries. I've just checked the CUDA 7.5 Release Candidate and it appears to ship with the OpenCL 1.2 library that you need.
You can link against any OpenCL 1.2 library, and it should work with NVIDA's drivers. You should just be able to install an SDK from AMD or Intel, or just download and build the OpenCL 1.2 Installable Client Driver (ICD) Loader directly from Khronos.
Upvotes: 3