View Full Version : build static OpenCL library

12-01-2012, 11:46 AM

I have downloaded AMDAPP SDK for OpenCL on Debian Squeeze. I would like to know if it is possible to build statically the OpenCL librairies. Currently, I have got in the "/opt/AMDAPP/lib/x86_64/" directory :

libglut.so libamdocl64.so libOpenCL.so.1 libGLEW.so

one may have : libglut.a libamdocl64.a libOpenCL.a libGLEW.a ??

I try to look options in the Makefile but without success.

anyone could tell me if we can do this and how ?

12-01-2012, 01:32 PM
In order for the OpenCL ICD (Installable Client Driver) mechanism to work (and support whichever hardware and drivers you have installed), you need to use OpenCL.DLL (e.g., under Windows) which is a dispatch layer to the driver. You can't statically link against it. However, you can statically link against the LIB file provided with your SDK which dynamically loads the DLL.

01-29-2013, 09:01 AM
It would be good to have a statically linked OpenCL CPU backend, that is always available.

Perhaps an open source OpenCL implementation can do it. It can coexist with the ICD.