现在的位置: 首页 > 综合 > 正文

iphone x264 库编译方法

2013年09月12日 ⁄ 综合 ⁄ 共 537字 ⁄ 字号 评论关闭

转自:http://blog.csdn.net/ixfly/article/details/7621258

首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压。

打开shell,进入x264的目录,执行如下语句

CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist'
--extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system' --enable-pic


然后make,libx264.a就出来啦。如果无法执行,请将语句中的5.0.sdk替换成你电脑里面有的sdk。

抱歉!评论已关闭.