LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2013, 02:11 AM   #1
JAYANTHI
LQ Newbie
 
Registered: Nov 2013
Posts: 3

Rep: Reputation: Disabled
trouble linking ffmpeg example code on linux


I'm trying to work on the ffmpeg example source file. Now, I'm trying to compile and link from the command line but I can't seem to get it to link.

I compiled the code and generated obj file.

My problem is on linking ,

I just tried this:

gcc -Wall -o example -L/home/jayanthi/example -lavcodec -lavutil example.o

At this point, I get error of 'undefined reference error'

example.o: In function `audio_encode_example':
example.c.text+0x25): undefined reference to `avcodec_find_encoder'
example.c.text+0x6a): undefined reference to `avcodec_alloc_context3'
example.c.text+0xad): undefined reference to `avcodec_open'
example.c.text+0x1ce): undefined reference to `sin'
example.c.text+0x238): undefined reference to `
..... etc.
collect2: ld returned 1 exit status
please help me out
 
Old 11-15-2013, 06:19 PM   #2
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37
Posts: 290

Rep: Reputation: 55
Libraries after object files.

gcc -o output_exe example.o -L/home/example -lavcodec
 
  


Reply

Tags
ffmpeg, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation of ffmpeg c code on linux JAYANTHI Linux - Newbie 1 11-13-2013 02:52 PM
Linking Masm .obj in linux C code yousafsajjad Programming 1 07-07-2010 03:38 PM
Linking C code against C++ library knobby67 Programming 1 12-06-2007 12:09 PM
Make Trouble linking some fortran code Make file problem? any ideas? TheBrick Linux - General 0 05-17-2006 12:21 PM
Trouble linking with libmqueue on Linux 2.6.5 -mm illuminatedwax Programming 0 04-14-2004 08:55 AM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration