为 iOS 5 编译 x264
我正在尝试将最新版本的 libx264 编译到 iOS 5 arm。
2010 年中期,Gabriel 构建脚本开始工作。
现在不再这样了。
它显示“未找到可用的 C 编译器”。
谁能给我直接的答案吗? 现在是 2012 年了,谷歌似乎没有人编译过它。
I'm trying to compile the latest version of libx264 to iOS 5 arm.
In mid-2010, the Gabriel script for building worked.
It doesn't anymore.
It says "No working C compiler found."
Can anyone give me straight answer?
It's 2012 and no one in google seems to have compiled it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
更新:
我已将所需的文件添加到下面的 github 存储库中。
https://github.com/rodisbored/ffmpeg_x264_iOS5_build
我拿了 gabriel 的脚本并修改了它。我一直想在网上发布完整的脚本,但这是您需要的部分。将其插入加布里埃尔的脚本中。这适用于 XCode 4.2。我还没有更新到4.3来测试路径名是否仍然有效,但我想你可以从下面找出更新的地方。
对于armv6
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs /iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv6' --extra-ldflags='-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv6' --enable-pic --disable-asm --enable -static
对于armv7
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv7' --extra-ldflags='-L/开发人员/平台/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv7' --enable-pic --enable-static
要将它们链接到 ffmpeg,请确保将库和标头的路径放入 --extra-cflags 和 --extra-ldflags 中。如果不这样做,它会抱怨找不到 libx264 库。以下是打开这一切所需的内容。
Update:
I've added the needed files to the github repository below.
https://github.com/rodisbored/ffmpeg_x264_iOS5_build
I took gabriel's script and modified it. I've been meaning to post the complete script online, but here's the part(s) you need. Pop it into Gabriel's script. This works with XCode 4.2. I haven't updated to 4.3 to test whether the path names are still valid, but I think you can figure out where to update from the below.
For armv6
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv6' --extra-ldflags='-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv6' --enable-pic --disable-asm --enable-static
For armv7
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv7' --extra-ldflags='-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv7' --enable-pic --enable-static
To link these to ffmpeg, make sure you put the path of the library and and headers into the --extra-cflags and --extra-ldflags. If you don't, it'll complain about not finding the libx264 library. The below is what you need to turn this all on.
您只需尝试以下几行:
Simply you can try these lines:
我更新了 Gabriel/rodisbored
build_x264
脚本,以便它可以与 Xcode 4.6 和 iOS SDK 6.1 配合使用。我的版本还构建了库,以便它可以在模拟器中运行。请参阅https://github.com/kristopherjohnson/kxmovie/blob/master/build_x264不幸的是,我放弃了尝试修复附带的
build_ffmpeg_x264.sh
脚本,而是更新了来自 https://github.com/kolyvan/kxmovie 的Rakefile
。因此,要查看我构建 x264 和 FFmpeg 的脚本,请查看 https://github.com/kristopherjohnson/kxmovieI've updated the Gabriel/rodisbored
build_x264
script so that it works with Xcode 4.6 and iOS SDK 6.1. My version also builds the library such that it can run in the simulator. See https://github.com/kristopherjohnson/kxmovie/blob/master/build_x264Unfortunately, I gave up on trying to fix the accompanying
build_ffmpeg_x264.sh
script, and instead updated theRakefile
from https://github.com/kolyvan/kxmovie. So, to see my scripts for building x264 and FFmpeg, look at https://github.com/kristopherjohnson/kxmovie