Skip to content

Static linking in windows #233

@Cookee24

Description

@Cookee24

When I was trying to static link the ffmpeg library under windows, I got the following errors.
Is static linking working on windows currently?

[dependencies.ffmpeg-next]
version = "7.1.0"
features = ["build"]
  --- stderr
  Cloning into 'ffmpeg-7.1'...
Updating files: 100% (8563/8563), done.
  thread 'main' panicked at C:\Software\rustup\.cargo\registry\src\index.crates.io-6f17d22bba15001f\ffmpeg-sys-next-7.1.0\build.rs:365:29:
  "C:\\Project\\target\\debug\\build\\ffmpeg-sys-next-533f5fee81379d93\\out\\ffmpeg-7.1\\configure" "--prefix=C:\\Project\\target\\debug\\build\\ffmpeg-sys-next-533f5fee81379d93\\out\\dist" "--enable-debug" "--disable-stripping" "--enable-static" "--disable-shared" "--enable-pthreads" "--enable-pic" "--disable-autodetect" "--disable-programs" "--disable-gpl" "--disable-version3" "--disable-nonfree" "--enable-avcodec" "--enable-avdevice" "--enable-avfilter" "--enable-avformat" "--disable-postproc" "--enable-swresample" "--enable-swscale" failed
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

And from my observation, the ffmpeg-7.1\configure is a shell script:

#!/bin/sh
#
# FFmpeg configure script
#
# Copyright (c) 2000-2002 Fabrice Bellard
# Copyright (c) 2005-2008 Diego Biurrun
# Copyright (c) 2005-2008 Mans Rullgard
............

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions