[Libav-user] Libavformat libavcodec problems while compiling
Alex Cohn
alexcohn at netvision.net.il
Tue Oct 18 02:47:40 CEST 2011
On Oct 17, 2011 8:39 PM, "Fernando Vasconcellos" <fernandovsv at gmail.com>
wrote:
>
> Hi,
>
> Im trying to manipulate libavformat and libavcodec for some streaming
project that im participating but some problems are on my way.
>
> Here is a simple code that i cant compile.
>
> #include <libavcodec/avcodec.h>
> #include <libavformat/avformat.h>
>
>
> #include <stdio.h>
> #include <stdlib.h>
> #include <stdbool.h>
>
> int main (int argc, const char * argv[]) {
> av_register_all();
>
> return 0;
> }
>
> compiled with: gcc -o tutorial01 teste.c -lavformat -lavcodec -lz -lm
You should add -lavutil and maybe other libraries too to your gcc command
line.
Good luck,
Alex
> with this ffmpeg version:
> ffmpeg version N-33135-g3b0e242, Copyright (c) 2000-2011 the FFmpeg
developers
> built on Oct 3 2011 14:26:14 with gcc 4.5.2
> 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
> libavutil 51. 18. 0 / 51. 18. 0
> libavcodec 53. 19. 0 / 53. 19. 0
> libavformat 53. 13. 0 / 53. 13. 0
> libavdevice 53. 4. 0 / 53. 4. 0
> libavfilter 2. 43. 6 / 2. 43. 6
> libswscale 2. 1. 0 / 2. 1. 0
> libpostproc 51. 2. 0 / 51. 2. 0
>
>
> Erros returned:
> /usr/local/lib/libavcodec.a(mjpeg2jpeg_bsf.o): In function
`mjpeg2jpeg_filter':
> /home/fernandovsv/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c:98: undefined
reference to `av_malloc'
> /home/fernandovsv/ffmpeg/libavcodec/mjpeg2jpeg_bsf.c:88: undefined
reference to `av_log'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20111018/6e214597/attachment.html>
More information about the Libav-user
mailing list