The premise is that the msys2 environment is ready.
- Download and unzip
slightly.
- Generate dll / def
rm *.dll
rm *.def
./configure \
--prefix=../lib-ffmpeg \
--host=x86_64-w64-mingw32 \
--host=mingw64 --enable-shared --disable-thread --disable-avs \
--extra-ldflags=-Wl,--output-def=libx264.def
# --host=mingw64
make
make install
# 为何叫这个名?
cp libx264-159.dll ../lib-ffmpeg/lib/libx264.dll
cp libx264.def ../lib-ffmpeg/lib
- Convert to lib
#若要生成64位lib文件则输入如下命令:
lib /machine:X64 /def:../../lib-ffmpeg/libx264.def
#若要生成32位lib文件则输入如下命令:
# lib /machine:i386 /def:../../lib-ffmpeg/libx264.def