[Libav-user] Need Help to execute demo program

sangeeta chowdhary sangitachowdhary at gmail.com
Tue Jan 15 13:03:21 CET 2013


Hi Carl,

Can you please tell me which all libraries I need to include while
compiling one short program,

 #include <stdio.h>
    #include <stdlib.h>
    #include "libavcodec/avcodec.h"
    #include "libavformat/avformat.h"

    int main(int argc, char *argv[])
    {
        av_register_all();

        return 0;
    }

I have given this command -

gcc -I/usr/src/ffmpegscript/ffmpeg/ test.c -lpthread
-L/usr/src/ffmpegscript/mplayer/ffmpeg/libavformat/ -lavformat
-L/usr/src/ffmpegscript/mplayer/ffmpeg/libavcodec/ -lavcodec
-L/usr/src/ffmpegscript/mplayer/ffmpeg/libswscale/ -lswscale
-L/usr/src/ffmpegscript/mplayer/ffmpeg/libavutil/ -lavutil
-L/usr/local/cpffmpeg/lib/ -lmp3lame -lm -lz -ldl

 I am still getting undefined references error.


undefined reference to `vorbis_analysis_buffer'
undefined reference to `D_IF_exit'
undefined reference to `Encoder_Interface_Encode'
undefined reference to `x264_picture_init'
 undefined reference to `x264_param_default_preset'
undefined reference to `xvid_global'
undefined reference to `BZ2_bzDecompressInit'

Looking forward for your help.

Regards,
Thanks,
Sangeeta





On Mon, Jan 14, 2013 at 5:19 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> sangeeta chowdhary <sangitachowdhary at ...> writes:
>
> > libmp3lame.c:(.text+0x4f): undefined reference to `lame_encode_flush'
>
> Looks as if -lmp3lame is missing.
>
> Please do not top-post on this mailing list, it is considered
> rude, and please force your mailer to "text-only".
>
> Carl Eugen
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130115/fee5f1e5/attachment.html>


More information about the Libav-user mailing list