<div style>rm -r ./compiled</div><div style><br></div><div style>echo Configure for armv7 build</div><div style>./configure \</div><div style>--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \</div>

<div style>--as='/usr/local/bin/<a href="http://gas-preprocessor.pl/" target="_blank" style="color:rgb(17,85,204)">gas-preprocessor.pl</a> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \</div>

<div style>--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \</div><div style>--target-os=darwin \</div><div style>--arch=arm \</div><div style>--cpu=cortex-a8 \</div>

<div style>--extra-cflags='-arch armv7' \</div><div style>--extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk' \</div>

<div style>--prefix=compiled/armv7 \</div><div style>--enable-cross-compile \</div><div style>--enable-nonfree \</div><div style>--enable-gpl \</div><div style>--disable-armv5te \</div><div style>--disable-swscale-alpha \</div>

<div style>--disable-doc \</div><div style>--disable-ffmpeg \</div><div style>--disable-ffplay \</div><div style>--disable-ffprobe \</div><div style>--disable-ffserver \</div><div style>--disable-asm \</div><div style>--disable-debug</div>

<div style><br></div><div style>make clean</div><div style>make && make install</div><div style><br></div><div style><br></div><div style>echo Configure for armv6</div><div style>./configure \</div><div style>--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \</div>

<div style>--as='/usr/local/bin/<a href="http://gas-preprocessor.pl/" target="_blank" style="color:rgb(17,85,204)">gas-preprocessor.pl</a> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \</div>

<div style>--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \</div><div style>--target-os=darwin \</div><div style>--arch=arm \</div><div style>--cpu=arm1176jzf-s \</div>

<div style>--extra-cflags='-arch armv6' \</div><div style>--extra-ldflags='-arch armv6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk' \</div>

<div style>--prefix=compiled/armv6 \</div><div style>--enable-cross-compile \</div><div style>--enable-nonfree \</div><div style>--enable-gpl \</div><div style>--disable-armv5te \</div><div style>--disable-swscale-alpha \</div>

<div style>--disable-doc \</div><div style>--disable-ffmpeg \</div><div style>--disable-ffplay \</div><div style>--disable-ffprobe \</div><div style>--disable-ffserver \</div><div style>--disable-asm \</div><div style>--disable-debug</div>

<div style><br></div><div style>make clean</div><div style>make && make install</div><div style><br></div><div style><br></div><div style>echo Configure for i386</div><div style>./configure \</div><div style>--cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc \</div>

<div style>--as='/usr/local/bin/<a href="http://gas-preprocessor.pl/" target="_blank" style="color:rgb(17,85,204)">gas-preprocessor.pl</a> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc' \</div>

<div style>--sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk \</div><div style>--target-os=darwin \</div><div style>--arch=i386 \</div><div style>

--cpu=i386 \</div><div style>--extra-cflags='-arch i386' \</div><div style>--extra-ldflags='-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk' \</div>

<div style>--prefix=compiled/i386 \</div><div style>--enable-cross-compile \</div><div style>--enable-nonfree \</div><div style>--enable-gpl \</div><div style>--disable-armv5te \</div><div style>--disable-swscale-alpha \</div>

<div style>--disable-doc \</div><div style>--disable-ffmpeg \</div><div style>--disable-ffplay \</div><div style>--disable-ffprobe \</div><div style>--disable-ffserver \</div><div style>--disable-asm \</div><div style>--disable-debug</div>

<div style><br></div><div style>make clean</div><div style>make && make install</div><div style><br></div><div style><br></div><div style># make fat (universal) libs</div><div style>mkdir -p ./compiled/fat/lib</div>

<div style><br></div><div style>lipo -output ./compiled/fat/lib/libavcodec.a  -create \</div><div style>-arch armv6 ./compiled/armv6/lib/libavcodec.a \</div><div style>-arch armv7 ./compiled/armv7/lib/libavcodec.a \</div>

<div style>-arch i386 ./compiled/i386/lib/libavcodec.a</div><div style><br></div><div style>lipo -output ./compiled/fat/lib/libavdevice.a  -create \</div><div style>-arch armv6 ./compiled/armv6/lib/libavdevice.a \</div><div style>

-arch armv7 ./compiled/armv7/lib/libavdevice.a \</div><div style>-arch i386 ./compiled/i386/lib/libavdevice.a</div><div style><br></div><div style>lipo -output ./compiled/fat/lib/libavformat.a  -create \</div><div style>
-arch armv6 ./compiled/armv6/lib/libavformat.a \</div>
<div style>-arch armv7 ./compiled/armv7/lib/libavformat.a \</div><div style>-arch i386 ./compiled/i386/lib/libavformat.a</div><div style><br></div><div style>lipo -output ./compiled/fat/lib/libavutil.a  -create \</div><div style>

-arch armv6 ./compiled/armv6/lib/libavutil.a \</div><div style>-arch armv7 ./compiled/armv7/lib/libavutil.a \</div><div style>-arch i386 ./compiled/i386/lib/libavutil.a</div><div style><br></div><div style>lipo -output ./compiled/fat/lib/libswresample.a  -create \</div>

<div style>-arch armv6 ./compiled/armv6/lib/libswresample.a \</div><div style>-arch armv7 ./compiled/armv7/lib/libswresample.a \</div><div style>-arch i386 ./compiled/i386/lib/libswresample.a</div><div style><br></div><div style>

lipo -output ./compiled/fat/lib/libpostproc.a  -create \</div><div style>-arch armv6 ./compiled/armv6/lib/libpostproc.a \</div><div style>-arch armv7 ./compiled/armv7/lib/libpostproc.a \</div><div style>-arch i386 ./compiled/i386/lib/libpostproc.a</div>

<div style><br></div><div style>lipo -output ./compiled/fat/lib/libswscale.a  -create \</div><div style>-arch armv6 ./compiled/armv6/lib/libswscale.a \</div><div style>-arch armv7 ./compiled/armv7/lib/libswscale.a \</div>

<div style>-arch i386 ./compiled/i386/lib/libswscale.a</div><div style><br></div><div style>lipo -output ./compiled/fat/lib/libavfilter.a  -create \</div><div style>-arch armv6 ./compiled/armv6/lib/libavfilter.a \</div><div style>

-arch armv7 ./compiled/armv7/lib/libavfilter.a \</div><div style>-arch i386 ./compiled/i386/lib/libavfilter.a</div><br><div class="gmail_quote">On Mon, Jun 4, 2012 at 6:30 AM, yntnfu <span dir="ltr"><<a href="mailto:yntnfu@163.com" target="_blank">yntnfu@163.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Follow the thread I compile ffmpeg successfully:<br>
<a href="http://ffmpeg.org/pipermail/libav-user/2012-March/001621.html" target="_blank">http://ffmpeg.org/pipermail/libav-user/2012-March/001621.html</a><br>
<a href="http://ffmpeg.org/pipermail/libav-user/2012-March/001621.html" target="_blank">http://ffmpeg.org/pipermail/libav-user/2012-March/001621.html</a><br>
<br>
But when I try to link it with my program , it happens like this:<br>
"ld: warning: ignoring file<br>
/Users/XXXX/ffmpeg/ffmpeg/armv7/libavcodec.a, file was built for<br>
archive which is not the architecture being linked (armv7)"<br>
<br>
It seems that no ARM7 libraries created.<br>
<br>
How to fix this?<br>
<br>
--<br>
View this message in context: <a href="http://libav-users.943685.n4.nabble.com/How-to-compile-FFmpeg-for-the-IOS-5-1-tp4655114.html" target="_blank">http://libav-users.943685.n4.nabble.com/How-to-compile-FFmpeg-for-the-IOS-5-1-tp4655114.html</a><br>


Sent from the libav-users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br>