Declare the native environment first
Dev-mini:ffmpeg devone$ Sw_vers
Productname:mac OS X
ProductVersion:10.9.2
buildversion:13c1021
Dev-mini:ffmpeg devone$ xcodebuild-version
Xcode5.1.1
Build version 5b1008
# # IOS7.1
http//ffmpeg.org/releases/ffmpeg-2.2.2.tar.bz2
sudowgethttp//ffmpeg.org/releases/ffmpeg-2.2.2.tar.bz2
sudowgetHttps//github.com/yuvi/gas-preprocessor/blob/master/gas-preprocessor.pl
sudoCPgas-preprocessor.pl/usr/bin/
sudochmoda+rwx/usr/bin/gas-preprocessor.pl
Xcode Path
/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos7.1.sdk/
Reference compilation options
Http://www.cnblogs.com/gugupluto/p/3404512.html hereby thank
# # Here is the simulator I386 version compiled
# # Perfect through
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
# # compiled FFmpeg armv7 (iPhone 3GS +)
# # Perfect through
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
# # compiled FFmpeg armv7s (iPhone5)
# # Perfect through
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
# # Description
1. gas-preprocessor.pl this file before, but tested, in the XCODE4 environment is needed, XCODE5 environment is no longer necessary.
2./applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain/usr/bin/cc here cc C + + clang++ It's all clang soft connections.
3. One more-miphoneos-version-min=7.0, no this field will make a dynamic library error, you can try it yourself.
# # to do
# # parameter optimization
# # http://blog.csdn.net/whf727/article/details/18089261