zmwangx / rust-ffmpeg-sys

FFmpeg bindings for Rust.
113 stars 75 forks source link

Static linking with vcpkg does not work in Windows unless you link to some extra libraries in build.rs #28

Open redzic opened 2 years ago

redzic commented 2 years ago

Hi, I was not able to get static linking working on windows via vcpkg unless I modified the build.rs to link to some extra libraries to fix some linker errors. I had this issue by using ffmpeg-next 4.4 with just the static feature enabled.

I had to link against these libraries (which worked for me by just adding println!("cargo:rustc-link-lib=...") in the build.rs):