Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to compile ffmpeg C example in RHEL 6 #3

Open
ghost opened this issue Jan 21, 2013 · 0 comments
Open

Not able to compile ffmpeg C example in RHEL 6 #3

ghost opened this issue Jan 21, 2013 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 21, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants