<div dir="ltr"><div>Hello!<br><br></div><div>When I run the encoding example (code inserted to the following cc-file) provided in doc/examples of the FFMpeg-library and compile it with the line <i>linux-y8h9:/home/anders/Programs # g++ videofecencoder.cc -lavformat -lavcodec -lavutil</i></div>
<div><i><br></i></div><div>I get the following error message:</div><div>/tmp/ccDQpTY5.o: In function `video_encode_example(char const*, int)':</div><div>videofecencoder.cc:(.text+0x30): undefined reference to `avcodec_find_encoder(CodecID)'</div>

<div>videofecencoder.cc:(.text+0x75): undefined reference to `avcodec_alloc_context3(AVCodec*)'</div><div>videofecencoder.cc:(.text+0x7d): undefined reference to `avcodec_alloc_frame()'</div><div>videofecencoder.cc:(.text+0xfc): undefined reference to `av_opt_set(void*, char const*, char const*, int)'</div>

<div>videofecencoder.cc:(.text+0x116): undefined reference to `avcodec_open2(AVCodecContext*, AVCodec*, AVDictionary**)'</div><div>videofecencoder.cc:(.text+0x1e2): undefined reference to `av_image_alloc(unsigned char**, int*, int, int, PixelFormat, int)'</div>

<div>videofecencoder.cc:(.text+0x330): undefined reference to `avcodec_encode_video(AVCodecContext*, unsigned char*, int, AVFrame const*)'</div><div>videofecencoder.cc:(.text+0x3b3): undefined reference to `avcodec_encode_video(AVCodecContext*, unsigned char*, int, AVFrame const*)'</div>

<div>videofecencoder.cc:(.text+0x464): undefined reference to `avcodec_close(AVCodecContext*)'</div><div>videofecencoder.cc:(.text+0x46f): undefined reference to `av_free(void*)'</div><div>videofecencoder.cc:(.text+0x47c): undefined reference to `av_free(void*)'</div>

<div>videofecencoder.cc:(.text+0x487): undefined reference to `av_free(void*)'</div><div>/tmp/ccDQpTY5.o: In function `main':</div><div>videofecencoder.cc:(.text+0x4a8): undefined reference to `avcodec_register_all()'</div>

<div>collect2: ld returned 1 exit status</div><div><br></div><div>I have tried the same using two different Ubuntu-installations. The above compilation was performed using OpenSUSE installed in a VirtualBox. I did the above at a new installation of OpenSUSE. After installing it I downloaded the required libraries using the libraries provided in the Software repository called 'PackMan'.</div>
<div><br></div><div>How do I resolve this?</div><div>Thanks in advance!</div><div><br></div>-- <b style="color:rgb(51,51,51);font-family:arial,sans-serif;font-size:13px">Kind regards, Anders Branderud</b><div><span style="border-collapse:collapse"><div>
<font color="#333333" face="arial, sans-serif"><br></font></div><font color="#000099" style="font-family:arial,sans-serif;font-size:13px">[Personal blog] <a href="http://www.proofexistencegod.com/will-of-god/will-of-god/" target="_blank">Will of the Creator</a>  : Logical reasons - based on scientific premises - for the existence of a Super intelligent and Orderly Creator and that He hasn't left His sapient creatures without an Instruction Manual - Torah ['books of Moses'] - to ascertain, and aspire to, His purpose.<br>

<br>[Company] Anders Branderud IT Solutions - <a href="http://www.abitsolutions.org/" target="_blank">www.abitsolutions.org</a></font></span><br>
</div></div>