title: Big problems while compiling FFMPEG for iOS5
body: <p>I'm trying to compile the ffmpeg library for iOS5. I tried different options but none works.</p>
  
  <p>I downloaded this: <a href="https://github.com/ciphor/ffmpeg4ios" rel="nofollow">https://github.com/ciphor/ffmpeg4ios</a> .</p>
  
  <p>I tried the original build_armv7 but it didn't work. I edited the build_arm7 file and now it looks like this:</p>
  
  <pre><code>#!/bin/tcsh -f
  
  if (! -d armv7) mkdir armv7
  if (! -d lib) mkdir lib
  
  rm armv7/*.a
  
  make clean
  
  ./configure --disable-network --disable-mpegaudio-hp --disable-lpc --disable-vaapi 
  --disable-vdpau --disable-hwaccels --disable-mmx --disable-mmx2 --disable-sse 
  --disable-ssse3 --disable-avx --disable-amd3dnow --disable-amd3dnowext --disable-vis 
  --disable-mmi --disable-doc --disable-yasm --disable-ffmpeg --disable-ffplay 
  --disable-ffprobe --disable-ffserver --disable-rdft --disable-dxva2 --disable-encoders 
  --disable-decoders --enable-decoder=h264 --disable-bsfs --disable-protocols 
  --disable-indevs --disable-outdevs --disable-devices --disable-filters --disable-demuxers --enable-demuxer=h264 
  --disable-muxers --disable-parsers --enable-parser=h264 --enable-cross-compile --arch=arm 
  --target-os=darwin 
  --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 --as='gas-preprocessor/gas-preprocessor.pl /Aplications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2' 
  --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk --cpu=cortex-a8 
  --extra-cflags='-pipe -Os -gdwarf-2 -issysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -m${thumb_opt:-no-thumb} 
  -mthumb-interwork' --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk' --enable-pic
  
  
  make
  
  mv libavcodec/libavcodec.a armv7/
  mv libavdevice/libavdevice.a armv7/
  mv libavformat/libavformat.a armv7/
  mv libavutil/libavutil.a armv7/
  mv libswscale/libswscale.a armv7/
  
  rm lib/*.a
  
  cp armv7/*.a lib/
  </code></pre>
  
  <p>But i get this error:</p>
  
  <blockquote>
    <p>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2 is unable to create an executable file.
    C compiler test failed.</p>
  </blockquote>
  
  <p>I looked all over the Internet. I have read all the posts on stackoverflow about this but none helped me. Please tell me what i'm doing wrong and please don't post me links: trust me, i saw them all!</p>