Thank you everybody... it worked! ;-)<br><br><div class="gmail_quote">On Tue, Mar 27, 2012 at 2:05 PM, Alex Cohn <span dir="ltr"><<a href="mailto:alexcohn@netvision.net.il">alexcohn@netvision.net.il</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Mar 27, 2012 at 18:00, Wagner Patriota<br>
<<a href="mailto:wagner.patriota@gmail.com">wagner.patriota@gmail.com</a>> wrote:<br>
> Thanks Gavin,<br>
><br>
> I am using the latest SDK and the latest FFMPEG..<br>
><br>
> I tried this:<br>
> ./configure<br>
> --enable-static<br>
> --disable-shared<br>
> --enable-pic<br>
> --sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk"<br>
> --extra-ldflags="-arch armv7 -isysroot<br>
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk<br>
> -miphoneos-version-min=5.1"<br>
> --enable-cross-compile<br>
> --arch=arm<br>
> --target-os=darwin<br>
> --cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc"<br>
> --cpu=cortex-a8<br>
> --extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-min=5.1"<br>
> --disable-debug<br>
> --enable-small<br>
> --disable-asm<br>
><br>
> based on your command, with some modifications in BOLD....<br>
><br>
> well.. it compiles... but when I try to link with my application I have:<br>
><br>
> Undefined symbols for architecture armv7:<br>
><br>
>   "__Z13avcodec_open2P14AVCodecContextP7AVCodecPP12AVDictionary", referenced<br>
> from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z21avformat_write_headerP15AVFormatContextPP12AVDictionary", referenced<br>
> from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z26av_interleaved_write_frameP15AVFormatContextP8AVPacket", referenced<br>
> from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z7av_freePv", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z10avio_flushP11AVIOContext", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z15av_guess_formatPKcS0_S0_", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z13av_dup_packetP8AVPacket", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z15av_register_allv", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z14av_dump_formatP15AVFormatContextiPKci", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z14av_free_packetP8AVPacket", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z20avcodec_find_decoder7CodecID", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z10avio_closeP11AVIOContext", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
><br>
> "__Z19avformat_open_inputPP15AVFormatContextPKcP13AVInputFormatPP12AVDictionary",<br>
> referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z16av_write_trailerP15AVFormatContext", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z9avio_openPP11AVIOContextPKci", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z13avcodec_closeP14AVCodecContext", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z19avformat_new_streamP15AVFormatContextP7AVCodec", referenced from:<br>
><br>
>       __ZL17add_output_streamP15AVFormatContextP8AVStream in Smooth.o<br>
><br>
>   "__Z25avformat_find_stream_infoP15AVFormatContextPP12AVDictionary",<br>
> referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z8av_freepPv", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z22avformat_alloc_contextv", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
>   "__Z13av_read_frameP15AVFormatContextP8AVPacket", referenced from:<br>
><br>
>       __Z4doItv in Smooth.o<br>
><br>
> ld: symbol(s) not found for architecture armv7<br>
><br>
> clang: error: linker command failed with exit code 1 (use -v to see<br>
> invocation)<br>
><br>
><br>
> Any suggestion?<br>
><br>
> Thanks...<br>
><br>
><br>
><br>
><br>
> On Tue, Mar 27, 2012 at 9:23 AM, Gavin Kinsey <<a href="mailto:gkinsey@ad-holdings.co.uk">gkinsey@ad-holdings.co.uk</a>><br>
> wrote:<br>
>><br>
>> On Friday 23 March 2012 21:22:33 Wagner Patriota wrote:<br>
>> > Has anybody done it yet?<br>
>><br>
>> Yes, haven't tested with the latest SDK yet but for 5.0 and below I have<br>
>> it<br>
>> working.<br>
>><br>
>> > I am using the following commands:<br>
>> ><br>
>> <snip commands><br>
>> ><br>
>> > But when I try to link my application with the libraries this above<br>
>> > script generates, I get the following:<br>
>> ><br>
>> > "ld: warning: ignoring file<br>
>> > /Users/Wagner/ffmpeg/ffmpeg/armv7/libavcodec.a, file was built for<br>
>> > archive which is not the architecture being linked (armv7)"<br>
>><br>
>> Configure flags that I use (minus the disable/enable decoders and stuff I<br>
>> have<br>
>> which aren't relevant)<br>
>><br>
>> configure --enable-static --disable-shared --enable-pic --<br>
>><br>
>> sysroot="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk"<br>
>> --extra-ldflags="-arch armv7 -isysroot<br>
>> /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -<br>
>> miphoneos-version-min=4.0" --enable-cross-compile --arch=arm --target-<br>
>> os=darwin --<br>
>> cc="/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" --<br>
>> cpu=cortex-a8 --extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-<br>
>> min=4.0" --disable-debug --enable-small<br>
>><br>
>> I also have a small patch to work around Apple gcc brokenness, which I've<br>
>> attached.<br>
>><br>
>> --<br>
>> Gavin Kinsey<br>
>> AD Holdings Plc<br>
<br>
</div></div>In your Smooth.cpp you should wrap #include "avformat.h" in extern "C"<br>
{ ... }, same for other ffmpeg include files.<br>
<br>
Hope this helps,<br>
Alex Cohn<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br>