-
Notifications
You must be signed in to change notification settings - Fork 4
Description
I am having one simple C example
#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 installed ffmpeg using ffmpeginstaller.7.4
I am using
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
command to compile this program.
But I am getting many undefined references error like
libopencore-amr.c:(.text+0x10): undefined reference to D_IF_exit' libopencore-amr.c:(.text+0xa4): undefined reference toD_IF_decode'
libopencore-amr.c:(.text+0x1db): undefined reference to Decoder_Interface_Decode' libvorbisenc.c:(.text+0x48): undefined reference tovorbis_analysis_buffer'
libvorbisenc.c:(.text+0xa9): undefined reference to vorbis_analysis_wrote' libvorbisenc.c:(.text+0xe5): undefined reference tovorbis_analysis_blockout'
libvorbisenc.c:(.text+0xfb): undefined reference to vorbis_analysis' libvorbisenc.c:(.text+0x10e): undefined reference tovorbis_bitrate_addblock'
libvorbisenc.c:(.text+0x174): undefined reference to vorbis_bitrate_flushpacket' libvorbisenc.c:(.text+0x2c9): undefined reference tovorbis_analysis_wrote'
libx264.c:(.text+0x30): undefined reference to x264_picture_init' libx264.c:(.text+0x36): undefined reference tox264_bit_depth'
libx264.c:(.text+0xef): undefined reference to x264_encoder_reconfig' libx264.c:(.text+0x11a): undefined reference tox264_encoder_reconfig'
libx264.c:(.text+0x16a): undefined reference to x264_encoder_encode' libx264.c:(.text+0x2c0): undefined reference tox264_encoder_delayed_frames'
libx264.c:(.text+0x3b9): undefined reference to x264_encoder_encode' libx264.c:(.text+0x3ed): undefined reference tox264_encoder_delayed_frames'
libx264.c:(.text+0x438): undefined reference to `x264_encoder_encode'
libx264.c:(.text.unlikely+0x84): undefined reference to x264_param_default' libx264.c:(.text.unlikely+0x104): undefined reference tox264_param_default_preset'
libx264.c:(.text.unlikely+0x21e): undefined reference to x264_param_parse' libx264.c:(.text.unlikely+0x358): undefined reference tox264_param_parse'
libx264.c:(.text.unlikely+0x3f0): undefined reference to x264_param_parse' libx264.c:(.text.unlikely+0x420): undefined reference tox264_param_parse'
libx264.c:(.text.unlikely+0x658): undefined reference to `x264_param_parse'
libxvid.c:(.text.unlikely+0x1dc): undefined reference to xvid_global' libxvid.c:(.text.unlikely+0x3ed): undefined reference toxvid_plugin_2pass2'
libxvid.c:(.text.unlikely+0x417): undefined reference to xvid_plugin_single' libxvid.c:(.text.unlikely+0x460): undefined reference toxvid_plugin_lumimasking'
libxvid.c:(.text.unlikely+0x778): undefined reference to `xvid_encore'
matroskadec.c:(.text+0x682): undefined reference to BZ2_bzDecompressInit' matroskadec.c:(.text+0x6d8): undefined reference toBZ2_bzDecompress'
matroskadec.c:(.text+0x714): undefined reference to BZ2_bzDecompressEnd' matroskadec.c:(.text+0x7bb): undefined reference toBZ2_bzDecompressEnd'
libxvid_rc.c:(.text+0x115): undefined reference to xvid_plugin_2pass2' libxvid_rc.c:(.text+0x20f): undefined reference toxvid_plugin_2pass2'
/usr/src/ffmpegscript/mplayer/ffmpeg/libavcodec//libavcodec.a(libxvid_rc.o): In function ff_xvid_rate_control_init': libxvid_rc.c:(.text+0x471): undefined reference toxvid_plugin_2pass2'
collect2: ld returned 1 exit status
Please help me to solve this problem