我在 Windows MSYS2 上使用以下命令用 libfreetype 编译 ffmpeg 时遇到问题:
./configure --pkg-config-flags="--static" --enable-libvpl --enable-libopenh264 --enable-version3 --enable-libfreetype --enable-libopus --enable-libvpx --enable-libvorbis --enable-libaom --enable-libdav1d --disable-gpl --disable-w32threads --enable-pthreads --disable-shared --enable-static --extra-cflags='--static' --extra-cflags="-I/mingw64/include -static" --extra-ldflags="-L/mingw64/lib -static" --prefix="/home/compiled"
我一直收到这个错误:
错误:使用 pkg-config 时未找到 freetype2
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
我已经用这个命令安装了 freetype:
pacman -Ss mingw-w64-x86_64-freetype
我也尝试从源代码编译 freetype2:
git clone https://git.savannah.gnu.org/git/freetype/freetype2.git
cd freetype2
mkdir build && cd build
/mingw64/bin/cmake .. -G "MSYS Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/mingw64
make
make install
pkg-config 给出了这个:
pkg-config freetype2 --cflags --libs
-IC:/msys64/mingw64/include/freetype2 -IC:/msys64/mingw64/include/harfbuzz -IC:/msys64/mingw64/include/glib-2.0 -IC:/msys64/mingw64/lib/glib-2.0/include -IC:/msys64/mingw64/include/libpng16 -lfreetype
我还应该做些什么来用这个包编译 ffmpeg 的静态版本吗?