<p>On Oct 17, 2011 8:39 PM, "Fernando Vasconcellos" <<a href="mailto:fernandovsv@gmail.com">fernandovsv@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> Im trying to manipulate libavformat and libavcodec for some streaming project that im participating but some problems are on my way.<br>
><br>
> Here is a simple code that i cant compile.<br>
><br>
> #include <libavcodec/avcodec.h><br>
> #include <libavformat/avformat.h><br>
><br>
><br>
> #include <stdio.h><br>
> #include <stdlib.h><br>
> #include <stdbool.h><br>
><br>
> int main (int argc, const char * argv[]) {<br>
> av_register_all();<br>
><br>
> return 0;<br>
> }<br>
><br>
> compiled with: gcc -o tutorial01 teste.c -lavformat -lavcodec -lz -lm</p>
<p>You should add -lavutil and maybe other libraries too to your gcc command line.</p>
<p>Good luck,<br>
Alex</p>
<p>> with this ffmpeg version:<br>
> ffmpeg version N-33135-g3b0e242, Copyright (c) 2000-2011 the FFmpeg developers<br>
>   built on Oct  3 2011 14:26:14 with gcc 4.5.2<br>
>   configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab<br>

>   libavutil    51. 18. 0 / 51. 18. 0<br>
>   libavcodec   53. 19. 0 / 53. 19. 0<br>
>   libavformat  53. 13. 0 / 53. 13. 0<br>
>   libavdevice  53.  4. 0 / 53.  4. 0<br>
>   libavfilter   2. 43. 6 /  2. 43. 6<br>
>   libswscale    2.  1. 0 /  2.  1. 0<br>
>   libpostproc  51.  2. 0 / 51.  2. 0<br>
><br>
><br>
> Erros returned:<br>
> /usr/local/lib/libavcodec.a(mjpeg2jpeg_bsf.o): In function `mjpeg2jpeg_filter':<br>
> /home/fernandovsv/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c:98: undefined reference to `av_malloc'<br>
> /home/fernandovsv/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c:88: undefined reference to `av_log'</p>