先申明本机环境

dev-mini:ffmpeg devone$ sw_vers 
ProductName:    Mac OS X
ProductVersion: 10.9.2
BuildVersion:   13C1021 dev-mini:ffmpeg devone$ xcodebuild -version
Xcode 5.1.1
Build version 5B1008 ## IOS7.1

http://ffmpeg.org/releases/ffmpeg-2.2.2.tar.bz2
sudo wget http://ffmpeg.org/releases/ffmpeg-2.2.2.tar.bz2
sudo wget https://github.com/yuvi/gas-preprocessor/blob/master/gas-preprocessor.pl
sudo cp gas-preprocessor.pl /usr/bin/
sudo chmod a+rwx /usr/bin/gas-preprocessor.pl

Xcode path
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/

参考编译选项
http://www.cnblogs.com/gugupluto/p/3404512.html 特此感谢
## 这里是模拟器I386版本编译
## 完美通过

sudo ./configure --prefix=../i386 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-mmx --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc" --extra-cflags="-arch i386 -mfpu=neon -miphoneos-version-min=7.0" --extra-ldflags="-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -miphoneos-version-min=7.0" --arch=i386 --cpu=i386 --disable-asm --disable-everything --enable-decoder=h264 --enable-decoder=rv40 --enable-decoder=aac 

sudo make
sudo make install

## 编译ffmpeg armv7(iPhone 3GS以上)
## 完美通过

sudo ./configure --prefix=../armv7 --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc" --extra-cflags="-arch armv7" --extra-ldflags="-arch armv7" --extra-ldflags=-L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/usr/lib/system --arch=arm --cpu=cortex-a8 --enable-pic  --disable-asm --disable-everything --enable-decoder=h264 --enable-decoder=rv40 --enable-decoder=aac 

## 编译ffmpeg armv7s(iPhone5)
## 完美通过

sudo ./configure --prefix=../armv7s --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --enable-cross-compile --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk" --target-os=darwin --cc="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc" --extra-cflags="-arch armv7s -mfpu=neon -miphoneos-version-min=7.0" --extra-ldflags="-arch armv7s -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk -miphoneos-version-min=7.0" --arch=arm --cpu=cortex-a9 --enable-pic  --disable-asm --disable-everything --enable-decoder=h264 --enable-decoder=rv40 --enable-decoder=aac 

## 说明
1. 以前需要gas-preprocessor.pl这个文件,但经过测试,在XCode4环境下是需要的,XCode5环境下已经不需要了。
2. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc 这里cc c++ clang++ 都是clang的软连接
3. 多了一个-miphoneos-version-min=7.0,没有这个字段会出错:
   /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc is unable to create an executable file.
  C compiler test failed.
 仅仅是针对I386模拟器版本编译参数 --extra-ldflags 后面的那个-miphoneos-version-min=7.0。其他版本不需要。

## to do
## 参数优化
## http://blog.csdn.net/whf727/article/details/18089261

Xcode5和ios7下交叉编译ffmpeg的更多相关文章

  1. ubuntu下交叉编译ffmpeg

    环境:ubuntu16.04 交叉编译器版本:4.8.3 依赖x264,lame x264: 1.wget ftp://ftp.videolan.org/pub/x264/snapshots/last ...

  2. 【从零学习openCV】IOS7下的openCV开发起步(Xcode5.1.1&openCV2.49)

    前言: 开发IOS7已经有一月的时间了.近期在准备推研的事,有点想往CV方向发展.于是開始自学openCV. 关注CSDN已经非常久了.也从非常多博主那学到了非常多知识,于是我也从这周开启自己的blo ...

  3. xCode5 在ios7模拟器中出现__cxa_throw _pthread_exit错误

    xCode5 在ios7模拟器中出现__cxa_throw _pthread_exit错误 2013年10月28日 ⁄ 综合 ⁄ 共 233字 ⁄ 字号 小 中 大 ⁄ 评论关闭   在项目中用模拟器 ...

  4. Android 环境下编译FFmpeg

    Android 环境下编译FFmpeg 开发环境:Ubuntu 12.04.2 LTS , android-sdk-linux, android-ndk-r8e 一 .X264 编译 1.    X2 ...

  5. 【从零学习openCV】IOS7下的人脸检測

    前言: 人脸检測与识别一直是计算机视觉领域一大热门研究方向,并且也从安全监控等工业级的应用扩展到了手机移动端的app,总之随着人脸识别技术获得突破,其应用前景和市场价值都是不可估量的,眼下在学习ope ...

  6. CGBitmapContextCreate函数参数详解 以及在 ios7下变化

    函数原型: CGContextRef CGBitmapContextCreate ( void *data,    size_t width,    size_t height,    size_t ...

  7. 微信在IOS7下无法分享图片

    家里老大的iphone5在WWDC后第一时间升级了IOS7. 整体的UI风格和功能都很喜欢, 偶尔的crash还能接受. 但是最常用的软件之一微信,在IOS7下无法分享图片这点一直让她耿耿于怀. 从用 ...

  8. ios7下不能录音问题解决

    在ios6上运行非常正常的AVAudioRecoder组件,而跑到ios7上就不能工作了.通过google搜索在stackoverflow上的解决方法.http://stackoverflow.com ...

  9. (转)xcode5.0.2下国际化图文解说

    原文:http://blog.csdn.net/dragoncheng/article/details/6703311 xcode5.0.2下国际化图文解说         分类:           ...

随机推荐

  1. C++中cin、cin.get()、cin.getline()、getline()、gets()等函数的用法

    学C++的时候,这几个输入函数弄的有点迷糊:这里做个小结,为了自己复习,也希望对后来者能有所帮助,如果有差错的地方还请各位多多指教(本文所有程序均通过VC 6.0运行) 1.cin 2.cin.get ...

  2. codeforces #313 div1 A

    捕获一只野生大水题! 首先我们知道边长为L的正三角形含有边长为1的小正三角形为L^2个 那么我们可以通过在六边形的正上,左下,右下补充正三角形使得原图形变成正三角形 然后再将补充的减去即可 #incl ...

  3. UIcollectionView的使用(首页的搭建2)

    2.2 直接购买的UIcollectionCell 2.2.1创建CFPromptBuyCell,继承自UICollectionViewCell,定义了标题和图片两个属性 2.2.2 在.m文件中定义 ...

  4. mybatis知识点

    1.Mybatis比IBatis比较大的几个改进是什么 a.有接口绑定,包括注解绑定sql和xml绑定Sql , b.动态sql由原来的节点配置变成OGNL表达式, c. 在一对一,一对多的时候引进了 ...

  5. HeadFirst设计模式之RMI介绍

    一.使用步骤 1.generate stubs and skeletons:Run rmic on the remote implementation class 如:D:\Workspaces\My ...

  6. paip.提升用户体验----gcc c++ JIT-debugging 技术

    paip.提升用户体验----gcc  c++ JIT-debugging 技术 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http ...

  7. 【HDOJ】4363 Draw and paint

    看题解解的.将着色方案映射为40*40*5*5*5*5*2个状态,40*40表示n*m,5*5*5*5表示上下左右相邻块的颜色,0表示未着色.2表示横切或者竖切.基本思路是记忆化搜索然后去重,关键点是 ...

  8. 第二部分 overlay 架构初探

    1 overlay可能支持的颜色格式/* possible overlay formats可能支持的颜色格式 */enum {    OVERLAY_FORMAT_RGBA_8888    = HAL ...

  9. 函数buf_ptr_get_fsp_addr

    #define FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID  34 /****************************************************** ...

  10. Microsoft强大团队(源代码)管理工具--TFS2010 与vs结合

    今天看了与vs 集成原理工具 TFS 2010, 角色分配.项目管理.开发源代码管理.任务分配管理.测试文档管理及跟踪等管理流程.代码版本的分支与合并等等,功能好强大啊. 以下将其安装配置简要介绍(以 ...