rust-opencl icon indicating copy to clipboard operation
rust-opencl copied to clipboard

Windows support

Open kazimuth opened this issue 10 years ago • 2 comments

(Opening a bunch of issues today!)

This would require finding an OpenCL.lib from one of the various SDKs and linking to it. (Which doesn't currently happen, I believe.) That could be done with a build.rs script.

kazimuth avatar Dec 27 '14 02:12 kazimuth

On Windows it seems to work if you find OpenCL.dll from the AMD APP SDK and copy it into a folder named lib in your project directory. Then invoke cargo as follows:

cargo rustc --example demo --release -- -l OpenCL -L lib

The EXE file that is compiled seems to work on its own when deployed to target machines (OpenCL.dll is no longer required)

oakwhiz avatar Nov 18 '15 08:11 oakwhiz

Compilation under Windows requires #[link(name="opencl")] extern "system" too as well.

pravic avatar May 15 '16 19:05 pravic