Question

How can I install OpenCL drivers under Cygwin?

For example, OpenCL under linux normally checks the /etc/OpenCL/vendors list for links to ICD drivers (e.g. on Linux, nvidia.icd references libnvidia-opencl.so.1), but since Cygwin doesn't have any Nvidia or OpenCL package, I'm assuming I'll have to set the links up manually.

I do have the Windows Nvidia CUDA dev kit installed on the same machine, but it's not obvious whether one of those files should be the one to link to.

[Note that I've already built the OpenCL loader implementation libopencl.a from coprthr, so that part is done - it's just figuring out how to reference the ICD]

Was it helpful?

Solution

To compile a C/C++ OpenCL program on Windows using Cygwin or MinGW you need to:

  • Make sure the OpenCL headers are on the include path. You can download them here.
  • Link against a static OpenCL library (libopencl.a), which you already have.

To run the program, it needs to find the dynamic OpenCL library DLL. The NVidia driver usually installs it at C:\Windows\System32.

This works for me.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top