Skip Navigation

Link against external DLL

Hello,

I am trying to use the SDK provided by the manufacturer of a camera from Rust. I use this in the build.rs :

println!(r"cargo:rustc-link-search=C:\Program Files\Digital Camera Toolbox\Camware4");
println!("cargo:rustc-link-lib=SC2_Cam");

However, it tries to find a .lib file, while the actual file is SC2_Cam.dll. I’ve tried specifying the kind as dylib=SC2_Cam but it makes no difference.

Am I missing something obvious, or is it just not possible? Do I have to manually load the DLL at runtime with things like the libloading crate?

3