zmwangx / rust-ffmpeg-sys

FFmpeg bindings for Rust.
125 stars 86 forks source link

Can not cross compile for Windows under Linux #21

Open ghost opened 3 years ago

ghost commented 3 years ago

When attempting to cross compile this crate for Windows under Linux using the build feature, the configure script reports:

  configure: Unknown OS 'windows'.

  If you think configure made a mistake, make sure you are using the latest
  version from Git.  If the latest version fails, report the problem to the
  ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
  Include the log file "ffbuild/config.log" produced by configure as this will help
  solve the problem.

I believe this happens because the build script sets the configure argument target_os to the value of CARGO_CFG_TARGET_OS, which Cargo sets as windows, a value the configure does not expect.