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

安装所需工具。

代码下载

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

执行以下代码进行编译:

复制代码
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

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

然后执行如下命令:

复制代码
make
make package-win32-zip
make package-win32-exe
相关推荐
Felix_One5 天前
Qt 串口通信避坑指南:QSerialPort 的 5 个常见问题
qt
blasit8 天前
笔记:Qt C++建立子线程做一个socket TCP常连接通信
c++·qt·tcp/ip
郑州光合科技余经理12 天前
代码展示:PHP搭建海外版外卖系统源码解析
java·开发语言·前端·后端·系统架构·uni-app·php
feifeigo12312 天前
matlab画图工具
开发语言·matlab
dustcell.12 天前
haproxy七层代理
java·开发语言·前端
norlan_jame12 天前
C-PHY与D-PHY差异
c语言·开发语言
多恩Stone12 天前
【C++入门扫盲1】C++ 与 Python:类型、编译器/解释器与 CPU 的关系
开发语言·c++·人工智能·python·算法·3d·aigc
QQ40220549612 天前
Python+django+vue3预制菜半成品配菜平台
开发语言·python·django
遥遥江上月12 天前
Node.js + Stagehand + Python 部署
开发语言·python·node.js
m0_5312371712 天前
C语言-数组练习进阶
c语言·开发语言·算法