
Libavcodec/opusdec.c:408: error: undefined reference to 'swr_close' Libavcodec/opusdec.c:117: error: undefined reference to 'swr_convert' Libavcodec/opusdec.c:236: error: undefined reference to 'swr_convert' Libavcodec/opusdec.c:169: error: undefined reference to 'swr_convert'

Libavcodec/opusdec.c:163: error: undefined reference to 'swr_init' Libavcodec/opusdec.c:222: error: undefined reference to 'swr_is_initialized' path/to/libavformat.a /path/to/libavcodec.aīut get the following list of errors, although I configured ffmpeg with -disable-libopus: libavcodec/opusdec.c:376: error: undefined reference to 'swr_is_initialized' I use the following command: g++ -O2 -static -o myBin myBin-myBin.o -lm -lpthread someotherlibraries.a I can't seem to find the reason why this doesn't statically link ffmpeg.I want to link a static build of ffmpeg when compiling a project to a static executable. rlib file, that ffmpeg-next should in turn be able to statically link correctly. The important part seem to be there: the rust-ffmpeg-sys crate is compiled with -l static=avcodec -l static=avdevice -l static=avfilter -l static=avformat -l static=avutil -lĪnd the path to the lib is correct: -L native=/home/polochon/Documents/Programming/Rust/bliss-rs/ffmpeg/lib. What bugs me is that looking at the rustc execution, it seems that it should work (pasted on an external website because it's huge Past-isserie). The compilation process works flawlessly, but then I get errors such as 0158:err:module:import_dll Library avcodec-59.dll (which is needed by L"Z:\\path\\to\\metadata.exe") not found, which pretty explicitly means that the static linking failed.ĬARGO_FEATURE_STATIC=foo FFMPEG_DIR=/path/to/precompiled/ffmpeg/windows/ffmpeg cargo build -release -example=metadata -target x86_64-pc-windows-gnu -verbose -features=static I'm trying to cross-compile a rust-ffmpeg example from linux x86_64 to x86_64-pc-windows-gnu, and then execute it.
