测试版本:20180829
Xcode:9.4.1
脚本地址:https://github.com/Kivenhaoyu/x264-iOS-build-script
脚本原地址:https://github.com/depthlove/x264-iOS-build-script
直接运行此脚本会自动下载 x264,并生成 iOS 编译包,修改下载连接部分
curl ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2 | tar xj && ln -s x264-snapshot-20180827-2245 x264 || exit 1
问题1 通过源代码编译出的X264程序,版本号最后一项为什么是x
这个情况是通过直接下载方式下载的源代码,由于没有git相关信息,所以编译出的程序通过-V 查看版本号时会显示诸如:0.152.x,而不是:0.152.2854 e9a5903(152是X264 Build 版本号)。所以为了同行之间方便交流或程序升级管理方面考虑,最好还是安装git,通过git下载源代码并编译出适合自己的x264程序。
问题2 iOS 编译出现 No working C compiler found.
这种情况检查方向有两种:
- Xcode 版本是否正常,是否有两个 Xcode 同时存在,两个是否都设置了 command line tool,打开 preferences->locations->command line tools
- command line tools 是否安装,打开终端输入
xcode-select --install
若显示为
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
则表示正常,若无则可直接继续安装