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
相关推荐
用户8055336980316 小时前
不止三件套:QObject 属性系统全关键字与运行时反射!
c++·qt
xcyxiner17 小时前
DicomViewer (vcpkg Windows和ubuntu编译)7
qt
Quz6 天前
QML Hello World 入门示例
qt
xcyxiner9 天前
DicomViewer (dcmtk读取dcm文件)5
qt
xcyxiner9 天前
DicomViewer (后台线程处理文件)4
qt
xcyxiner10 天前
DicomViewer (添加模型类)3
qt
xcyxiner10 天前
DicomViewer (目录调整) 2
qt
xcyxiner11 天前
dcmtk vtk vtk-dicom(gdcm) 编译(debug) v2
qt
LDR00612 天前
Type-C 快充全面升级!LDR6601 赋能个人护理便携电机,重塑剃须刀 / 理发器新体验
c语言·开发语言
雪碧聊技术12 天前
Tree.js是什么?一文讲透
开发语言·javascript·ecmascript