iphone x264 库编译方法

转自: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。

你可能感兴趣的:(shell,iPhone)