iphone x264 库编译方法

来源:互联网 发布:prorecorder一样的软件 编辑:程序博客网 时间:2024/06/11 01:20
首先到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。

注意:

    CC=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc

    请确保,路径正确。

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

原创粉丝点击