xcode3.2.6,sdk4.3,ffmpeg0.10.2,编译
2012-10-11 23:05
281 查看
只能编译armv7 and i386
编译ffmepg模拟器版本i386:
1. 到https://github.com/gabriel/ffmpeg-iphone-build下载ffmpeg-iphone-build
2.先将gas-preprocessor.pl拷贝到/usr/sbin/目录中。
3.到ffmpeg官网上下载ffmpeg源码
4.在终端下定位到ffmpeg的目录运行
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-avfilter --disable-debug --disable-encoders --enable-cross-compile --disable-decoders --disable-armv5te --enable-decoder=h264 --enable-pic
--cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' --extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system
--sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk --target-os=darwin --arch=i386 --cpu=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386'
5.输入make命令
6.将libavcodec.a,libavdevice.a,libavformat.a,libavutil.a,libswscale.a到对应的目录下拷贝出来。
附注:
//编译日志
在加个 i386的 错误
If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first
解决:
before this cleanAll build then
In xcode go to Project > set active executable > appname - Iphone 4.0 simulator
then open simulator then go to Hardware > version > 4.0.2
then double click urapptarget and in build tab change "ios deployment target = 4.0"
now run in simulator it will work
//遇到sh^M 问题解决:
最近在使用CT++这个软件时遇到这样一个问题:这个软件是在FREEBSD下开发的,虽然提供了C语言源程序,但程序在Visual Studio 2003下编译出现错误。检查原因,主要是因为源程序都是UNIX格式,每行的回车都是用一个0x0a字符表示的,而在WINDOWS/DOS下每行的回车都是用0x0d0a两个字符表示的,而该程序注释为俄文,影响了VS2003的处理,把大量的程序代码都当作注释了,所以编译就不能通过。要编译通过,必须先将UNIX文本格式转换为DOS格式的。UltraEdit的FILE菜单中提供了对单个文件进行这种转换的能力,但是一次只能转换一个文件,比较麻烦。经过一番研究,终于找到了一个批量实现转换的方法。在UE中选择Search
| Search in files菜单,在Find框中填写^n(表示UNIX文件中的回车换行符号),在Replace with中输入^p(表示DOS文件中的回车换行符号),如下图所示。这样就可以实现批量替换了。
编译armv7版本:
./configure \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/system \
--target-os=darwin \
--arch=arm \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7' \
--extra-ldflags='-arch armv7' \
--enable-pic \
--enable-cross-compile \
--enable-ffmpeg \
--disable-ffplay \
--disable-ffserver \
--disable-asm \
--disable-encoders \
--disable-decoders \
--enable-decoder=h264 \
--disable-doc
编译ffmepg模拟器版本i386:
1. 到https://github.com/gabriel/ffmpeg-iphone-build下载ffmpeg-iphone-build
2.先将gas-preprocessor.pl拷贝到/usr/sbin/目录中。
3.到ffmpeg官网上下载ffmpeg源码
4.在终端下定位到ffmpeg的目录运行
./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --disable-avfilter --disable-debug --disable-encoders --enable-cross-compile --disable-decoders --disable-armv5te --enable-decoder=h264 --enable-pic
--cc=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' --extra-ldflags=-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib/system
--sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk --target-os=darwin --arch=i386 --cpu=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386'
5.输入make命令
6.将libavcodec.a,libavdevice.a,libavformat.a,libavutil.a,libswscale.a到对应的目录下拷贝出来。
附注:
//编译日志
在加个 i386的 错误
If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first
解决:
before this cleanAll build then
In xcode go to Project > set active executable > appname - Iphone 4.0 simulator
then open simulator then go to Hardware > version > 4.0.2
then double click urapptarget and in build tab change "ios deployment target = 4.0"
now run in simulator it will work
//遇到sh^M 问题解决:
最近在使用CT++这个软件时遇到这样一个问题:这个软件是在FREEBSD下开发的,虽然提供了C语言源程序,但程序在Visual Studio 2003下编译出现错误。检查原因,主要是因为源程序都是UNIX格式,每行的回车都是用一个0x0a字符表示的,而在WINDOWS/DOS下每行的回车都是用0x0d0a两个字符表示的,而该程序注释为俄文,影响了VS2003的处理,把大量的程序代码都当作注释了,所以编译就不能通过。要编译通过,必须先将UNIX文本格式转换为DOS格式的。UltraEdit的FILE菜单中提供了对单个文件进行这种转换的能力,但是一次只能转换一个文件,比较麻烦。经过一番研究,终于找到了一个批量实现转换的方法。在UE中选择Search
| Search in files菜单,在Find框中填写^n(表示UNIX文件中的回车换行符号),在Replace with中输入^p(表示DOS文件中的回车换行符号),如下图所示。这样就可以实现批量替换了。
编译armv7版本:
./configure \
--cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \
--as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \
--sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \
--extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/usr/lib/system \
--target-os=darwin \
--arch=arm \
--cpu=cortex-a8 \
--extra-cflags='-arch armv7' \
--extra-ldflags='-arch armv7' \
--enable-pic \
--enable-cross-compile \
--enable-ffmpeg \
--disable-ffplay \
--disable-ffserver \
--disable-asm \
--disable-encoders \
--disable-decoders \
--enable-decoder=h264 \
--disable-doc
相关文章推荐
- xcode3.2.6,sdk4.3,ffmpeg0.10.2,编译
- ffmpeg-0.10.2 xcode4.3 IOS5.1 真机调试编译过程
- ffmpeg-0.10.2 xcode4.3 IOS5.1 真机调试编译过程
- ffmpeg-0.10.2 xcode4.3 IOS5.1 真机调试编译过程
- ffmpeg-0.10.2 xcode4.3 IOS5.1 真机调试编译过程
- xcode4.2 IOS5 编译低于sdk4.3的程序的办法
- Unity + Xcode3.2.6 + iOS SDK4.3
- Unity + Xcode3.2.6 + iOS SDK4.3的问题终于得到解决
- xcode4.2 IOS5 编译低于sdk4.3的程序的办法
- xcode4.2 IOS5 编译低于sdk4.3的程序的办法(转)
- IOS 编译ffmpeg For SDK6.1,模拟器、armv7、armv7s均可使用
- Xcode5--sdk7.1-----编译ffmpeg
- XCode 4.0 iOS SDK 4.3 iPhone证书破解 完全教程
- 如何用Xcode 4.5 编译支持 armv6 CPU及iOS 4.3以前的版本
- 如何用Xcode 4.5 编译支持 armv6 CPU及iOS 4.3以前的版本
- XCode5 编译ffmpeg流程
- iOS Xcode 5.1.1 使用微信不通过编译问题(ibWeChatSDK.a, missing required architecture arm64)
- xcode_4_and_ios_sdk_4.3__final相关下载地址
- XCode5下编译lua;curl;openssl;xvid;x264;ffmpeg;isofs;libuv FOR iOS7
- 在Xcode 4.3(4E109,iOS 5 SDK)上开发基于iOS 4.3应用的注意事项