当前位置:   article > 正文

QT MinGW64编译vlc源码

QT MinGW64编译vlc源码

编译环境搭建

参考文章《QT Mingw32/64编译ffmpeg源码生成32/64bit库以及测试》,搭建msys64环境;
运行msys.exe,运行:

pacman -S git subversion cvs automake autoconf libtool m4 make gettext pkg-config mingw-w64-i686-lua findutils  mingw-w64-i686-headers yasm patch
pacman -S gettext
pacman -S flex
pacman -S bison
pacman -S protobuf
  • 1
  • 2
  • 3
  • 4
  • 5

安装所需工具。

代码下载

VLC源码,我是用的vlc 2.2.4
http://download.videolan.org/pub/videolan/vlc/
https://mirrors.tuna.tsinghua.edu.cn/videolan-ftp/vlc/
VLC Contrib:
http://download.videolan.org/pub/videolan/contrib/x86_64-w64-mingw32/
https://mirrors.tuna.tsinghua.edu.cn/videolan-ftp/contrib/x86_64-w64-mingw32/

编译

将contrib解压到vlc源码的contrib文件夹下。
运行msys64安装目录下的mingw64.exe。
如果没有下载contrib文件,则需要执行以下命令在线获取,速度很慢,可以直接下载清华源中的文件:

cd contrib/
mkdir win32
cd win32/
../bootstrap --build=x86_64-w64-mingw32
make prebuilt
  • 1
  • 2
  • 3
  • 4
  • 5

执行以下代码进行编译:

cd vlc源码目录
export BUILDCC="/usr/bin/gcc"
./bootstrap
mkdir win32
cd win32/
sh ../extras/package/win32/configure.sh --host=x86_64-w64-mingw32 --disable-nls
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

configure会报很多错,像“”onfigure: error:libavcodec versions 55 and later are not supported yet”,可以使用下面的configure:

sh ../extras/package/win32/configure.sh --host=x86_64-w64-mingw32 --disable-nls --disable-lua --disable-mad --disable-avcodec --disable-avformat--disable-swscale --disable-postproc --disable-a52 --disable-mkv
  • 1

然后执行如下命令:

make
make package-win32-zip
make package-win32-exe
  • 1
  • 2
  • 3
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/184711
推荐阅读
相关标签
  

闽ICP备14008679号