luqmana / rust-opencl

OpenCL bindings for Rust.
Other
170 stars 42 forks source link

Windows support #53

Open kazimuth opened 9 years ago

kazimuth commented 9 years ago

(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.

oakwhiz commented 8 years ago

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)

pravic commented 8 years ago

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