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
相关推荐
吾爱星辰3 小时前
Kotlin 处理字符串和正则表达式(二十一)
java·开发语言·jvm·正则表达式·kotlin
ChinaDragonDreamer3 小时前
Kotlin:2.0.20 的新特性
android·开发语言·kotlin
IT良3 小时前
c#增删改查 (数据操作的基础)
开发语言·c#
Kalika0-04 小时前
猴子吃桃-C语言
c语言·开发语言·数据结构·算法
_.Switch4 小时前
Python Web 应用中的 API 网关集成与优化
开发语言·前端·后端·python·架构·log4j
代码雕刻家4 小时前
课设实验-数据结构-单链表-文教文化用品品牌
c语言·开发语言·数据结构
一个闪现必杀技4 小时前
Python入门--函数
开发语言·python·青少年编程·pycharm
Fan_web4 小时前
jQuery——事件委托
开发语言·前端·javascript·css·jquery
龙图:会赢的4 小时前
[C语言]--编译和链接
c语言·开发语言
威桑5 小时前
记一次控件提升后,运行却不显示的Bug
qt