<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 18, 2015 at 8:30 PM, Paul B Mahol <span dir="ltr"><<a href="mailto:onemda@gmail.com" target="_blank">onemda@gmail.com</a>></span> wrote:<br><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">On 9/18/15, gaurav mishra <<a href="mailto:gauravmishra.itbhu@gmail.com">gauravmishra.itbhu@gmail.com</a>> wrote:<br>
> Hi,<br>
> I have written a app using ffmpeg's library and am able to compile and run<br>
> it on my mac (slighly older version of ffmpeg installed). But when i am<br>
> trying to build the code on ubuntu machine i am getting some errors<br>
> few of them being<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavformat/rtmpproto.c:1087: undefined<br>
> reference to `inflate'<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavformat/rtmpproto.c:1105: undefined<br>
> reference to `inflateEnd'<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavformat/rtmpproto.c:1105: undefined<br>
> reference to `inflateEnd'<br>
><br>
> /usr/local/lib/libavformat.a(swfdec.o): In function `swf_read_packet':<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavformat/swfdec.c:358: undefined<br>
> reference to `uncompress'<br>
><br>
> /usr/local/lib/libavformat.a(swfdec.o): In function `swf_read_header':<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavformat/swfdec.c:147: undefined<br>
> reference to `inflateInit_'<br>
><br>
> /usr/local/lib/libavformat.a(swfdec.o): In function `zlib_refill':<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavformat/swfdec.c:115: undefined<br>
> reference to `inflate'<br>
><br>
> /usr/local/lib/libavformat.a(swfdec.o): In function `swf_read_close':<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavformat/swfdec.c:523: undefined<br>
> reference to `inflateEnd'<br>
><br>
> /usr/local/lib/libavcodec.a(cscd.o): In function `decode_frame':<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavcodec/cscd.c:91: undefined<br>
> reference to `uncompress'<br>
><br>
> /usr/local/lib/libavcodec.a(dxa.o): In function `decode_frame':<br>
><br>
> /home/ubuntu/ffmpeg_sources/ffmpeg/libavcodec/dxa.c:250: undefined<br>
> reference to `uncompress'<br>
><br>
><br>
> the list of undefined reference errors is quite huge.<br>
><br>
> the command which i am using to link looks like this--<br>
><br>
> g++  file1.o file2.o file3.o  -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib<br>
> -L/home/ubuntu/casablanca/Release/build.release/Binaries -lpthread<br>
> -lavutil  -lavformat<br>
> -lavcodec -lavfilter -lboost_system -lboost_thread -lboost_chrono -lcpprest<br>
> -lswscale -o final<br>
<br>
<br>
</div></div>Hmm try linking with -lzlib too.<br></blockquote><div><br></div><div>After some trial and errors i figured out the command to make it work. i had to link lzlib, libx264, libfdk-aac ,libopus -libva to make it work. </div><div>







<p class=""><span class="">-lavformat -lavcodec -lavutil -lpthread -lz -lfdk-aac -lx264 -lopus -lswresample -lva -lboost_system -lboost_thread -lboost_chrono -lcpprest </span></p></div><div> I wonder why the build worked on my mac with just following libs  - </div><div>-lavformat -lavcodec -lavutil -lboost_system -lboost_thread -lboost_chrono -lcpprest <br></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=""><br>
> the issue seems to be related to order of linking. is there a mistake in<br>
> order in which i am linking the libs.<br>
> PS - lpthread was not required when i was building on my mac.<br>
><br>
> following is the output of ffmpeg -i<br>
><br>
> ffmpeg version N-75410-g58fe57d Copyright (c) 2000-2015 the FFmpeg<br>
> developers<br>
><br>
>   built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)<br>
><br>
>   configuration: --enable-gpl --enable-libfdk-aac --enable-libx264<br>
> --enable-libopus --enable-nonfree<br>
><br>
>   libavutil      55.  2.100 / 55.  2.100<br>
><br>
>   libavcodec     57.  3.100 / 57.  3.100<br>
><br>
>   libavformat    57.  2.100 / 57.  2.100<br>
><br>
>   libavdevice    57.  0.100 / 57.  0.100<br>
><br>
>   libavfilter     6.  5.100 /  6.  5.100<br>
><br>
>   libswscale      4.  0.100 /  4.  0.100<br>
><br>
>   libswresample   2.  0.100 /  2.  0.100<br>
><br>
>   libpostproc    54.  0.100 / 54.  0.100<br>
><br>
</span>_______________________________________________<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" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br></div></div>