Open thewh1teagle opened 6 months ago
Tried the following in msys2
inside ucrt64
terminal
NAME=ffmpeg-n4.4-latest-win64-gpl-shared-4.4
if [ ! -d shared/$NAME ]; then
wget -q --show-progress https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/$NAME.zip -O shared.zip
unzip shared.zip -d shared
fi
export FFMPEG_DIR="$(pwd)/shared/$NAME"
echo "\$FFMPEG_DIR is $FFMPEG_DIR"
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$FFMPEG_DIR/lib/pkgconfig
echo "\$PKG_CONFIG_PATH is $PKG_CONFIG_PATH"
export PKG_CONFIG_SYSTEM_INCLUDE_PATH="$FFMPEG_DIR/libavcodec:$FFMPEG_DIR/libavdevice:$FFMPEG_DIR/libavfilter:$FFMPEG_DIR/libavformat:$FFMPEG_DIR/libavutil:$FFMPEG_DIR/libpostproc:$FFMPEG_DIR/libswresample:$FFMPEG_DIR/libswscale"
echo "\$PKG_CONFIG_SYSTEM_INCLUDE_PATH is $PKG_CONFIG_SYSTEM_INCLUDE_PATH"
export LIBCLANG_PATH=$MINGW_PREFIX/bin
cargo build
It almost finish compile and then
error: could not find native static library `avcodec`, perhaps an -L flag is missing?
I use
ffmpeg_next
in ruscribe And I build it insidemsys2
environment (ucrt64
) It works well, but if I want to use it outside of the environment (inwindows
itself) there's missingDLL's
which it needs to load dynamically, I would like to link them staticlly so I can ship singleexe
to users without extra files.The error looks like![image](https://github.com/zmwangx/rust-ffmpeg/assets/61390950/3e8a29ab-5b0c-4bc4-82de-9aa0b9bc2e88)
Missing DLL(s) are:
avdevice-60.dll
avfilter-9.dll
avformat-60.dll
avcodec-60.dll
The are inC:\msys64\ucrt64\bin\
Coming from the package: mingw-w64-ucrt-x86_64-ffmpeg