磕磕碰碰,Xcode6.1编译x264库
来源:互联网 发布:信息泄露 知乎 编辑:程序博客网 时间:2024/05/29 08:18
此篇文章的环境:xcode6.1 sdk8.1
编译的版本:真机armv7 arm64
这两天在编译x264的库,按照网上的方法
一,x264库的编译
首先到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 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system' --enable-pic
make,make install;
发现,出现No working C compiler found.错误,原因是 没有在/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc 下面找到gcc,因为上面的语句是 在xcode4.2编译的,现在xcode6.1了,那个路径下没有gcc了,后来根据查找各种资料,各种尝试,希望遇到同样问题的不要走弯路,最后的命令如下:
armv7
CC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -L /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/system' --enable-pic --disable-asm
运行完了以后再运行make就可以找到libx264.a库
arm64
CC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc ./configure --host=arm-apple-darwin --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk --extra-cflags='-arch arm64' --extra-ldflags='-arch arm64 -L /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/lib/system' --enable-pic --disable-asm
运行完了以后再运行make就可以找到libx264.a库- 磕磕碰碰,Xcode6.1编译x264库
- windows编译X264库
- iphone x264 库编译方法
- iphone x264 库编译方法
- 实战x264,ffmpeg库编译
- iphone x264 库编译方法
- 使用NDK编译x264库
- FFmpeg+x264编译Android库
- 编译x264
- x264编译
- 编译x264
- x264编译
- 编译x264
- X264编译
- x264 编译
- X264编译
- x264 编译
- x264编译
- Spring MVC 3.0 深入及对注解的详细讲解
- Apache配置路由之PHP
- [LeetCode] Gas Station
- IOS 数据存储的区别
- 获取程序版本号等信息
- 磕磕碰碰,Xcode6.1编译x264库
- delphi数据库中ADOConnecting位置对查询结果的影响
- Spring Web MVC入门——深入浅出学Spring Web MVC
- SQL查询的琐碎知识点
- 新手报道
- 筛选 过滤
- android 自定义字体ttf使用的几种方法
- Host XXX is blocked because of many connection errors
- U盘安装CentOS 6.2