msys2配置参考https://blog.csdn.net/asdasfdgdhh/article/details/111518788
一: 编译x264
https://code.videolan.org/videolan/x264
pacman -S gcc mingw-w64-x86_64-toolchain yasm mingw-w64-x86_64-SDL2 make diffutils
./configure --prefix=/d/libx264 --host=x86_64-w64-mingw32 --enable-shared --extra-ldflags=-Wl,--output-def=libx264.def
make && make install
不管是mingw32还是mingw64都使用:
./configure --prefix=/usr/local/libx264 --enable-shared --host=i686-w64-mingw32 //mingw32
不用怀疑,确实叫“x86_64-w64-mingw32”不是“x86_64-w64-mingw64”。
二: ffmpeg编译支持libx264
export PKG_CONFIG_PATH=d/libx264/lib/pkgconfig:$PKG_CONFIG_PATH
./configure --prefix=/d/ffmpeg-x264 --enable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl --enable-libx264 --extra-cflags=-I/d/libx264/include --extra-ldflags=-L/d/libx264/lib
make -j4 && make install