<div dir="ltr">On Wed, Jan 23, 2013 at 3:22 PM, Carl Eugen Hoyos <span dir="ltr"><<a href="mailto:cehoyos@ag.or.at" target="_blank">cehoyos@ag.or.at</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">Srinath M <srinath3142@...> writes:<br>

<br>
> clang -o tld tld.o -L"../lib" -lccv -lavformat -lavcodec -lswscale -lz -lm<br>
><br>
> /usr/local/lib/libavformat.a(concat.o): In function `concat_close':<br>
> /home/srinath/Downloads/ffmpeg-1.1.1/libavformat/concat.c:52:<br>
> undefined reference to `av_freep'<br>
<br>
</div>Whenever you link with one of FFmpeg's libraries, you<br>
have to add avutil which is a prerequisite for all<br>
other libraries.<br>
<br>
Generally, it may be a good idea to run "grep" in such<br>
a case (or even nm), it may tell you were the missing<br>
symbol is defined.<br>
<br>
Please do not top-post here, it is considered rude.<br>
<span class=""><font color="#888888"><br>
Carl Eugen<br></font></span></blockquote><div><br></div><div><br></div><div style>Thanks Carl, that reduced the linker errors from more than a 100 to about 10.</div><div style>This is a sample of the 10 or so that remain</div>
<div style><div>clang -o tld tld.o -L"../lib" -lccv -lavformat -lavcodec -lswscale -lavutil -lz -lm </div><div><br></div><div>/usr/local/lib/libavformat.a(matroskadec.o): In function `matroska_decode_buffer':</div>
<div>/home/srinath/Downloads/ffmpeg-1.1.1/libavformat/matroskadec.c:1138: undefined reference to `BZ2_bzDecompressInit'</div><div><br></div><div><div>/usr/local/lib/libavformat.a(udp.o): In function `udp_close':</div>
<div>/home/srinath/Downloads/ffmpeg-1.1.1/libavformat/udp.c:824: undefined reference to `pthread_cancel'</div></div><div><div><br></div></div><div style>And 8 more similar errors.</div><div style><br></div><div style>
<div>nm libavformat.a | grep 'matroska_decode_buffer'</div><div>000005e0 t matroska_decode_buffer</div><div><br></div><div><div>nm libavformat.a | grep 'BZ2_bzDecompressInit'</div><div>         U BZ2_bzDecompressInit</div>
</div><div><br></div><div style>Infact when i run nm with the -U option it lists a large number of undefined symbols. </div><div style>How could i make ffmpeg and compile the /doc/examples succesfully and still have so many undefined symbols? </div>
</div><div>Are these dependency packages that would normally be installed by Ubuntu or other Linux flavors? I don't think so because some of the undefined symbols are things such as<br></div><div><div>xwma.o:</div><div>
         U __divdi3</div><div>         U __udivdi3</div><div>         U av_add_index_entry</div><div>         U av_free</div><div>         U av_get_packet</div><div>         U av_log</div><div>         U av_log_ask_for_sample</div>
<div>         U av_malloc</div></div><div><br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><font color="#888888">
</font></span><div class=""><div class="h5"><br>
_______________________________________________<br>
Libav-user mailing list </div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">
<div class="h5">
<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></div></div>