iphone x264 库编译方法

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

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

CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --prefix='dist' --extra-cflags='-arch armv7s' --extra-ldflags='-arch armv7s -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system' --enable-pic

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

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