LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 05-07-2013, 05:33 AM   #1
cuiy0001
LQ Newbie
 
Registered: Oct 2012
Posts: 9

Rep: Reputation: Disabled
I am really confused with this kind of compilation error..


Hi all ,I downloaded the latest ffmpeg source code and successfully installed it on Ubuntu
But I failed to compile a simple demo.

Here are the error messages ,just to name a few:

error: unknown type name 'AVFrame'

error: 'NULL' undeclared (first use in this function)

error: request for member 'streams' in something not a structure or union

error: 'AVMEDIA_TYPE_VIDEO' undeclared (first use in this function)
error: expected expression before ')' token

Can you help me solve this problem?

Here are some additional info
ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers built on May 7 2013 14:10:58 with gcc 4.7 (Ubuntu/Linaro 4.7.2-2ubuntu1) configuration: --enable-gpl --prefix=/usr --enable-libx264 --enable-pthreads

And this is the actuall CODE

https://github.com/phamquy/FFmpeg-tu...r/tutorial01.c


This is created in Qt and the Qt pro file.
Quote:
QT -= gui
TEMPLATE = app SOURCES += \ ../tutorial01.c
LIBS += -L/-lavcodec -lavformat -lswscale -lavutil
 
Old 05-07-2013, 06:18 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,159

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
error: unknown type name 'AVFrame' means probably you missed an include or the system found an incompatible header file. Actually the information you gave is not enough.
 
Old 05-07-2013, 08:46 AM   #3
cuiy0001
LQ Newbie
 
Registered: Oct 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
error: unknown type name 'AVFrame' means probably you missed an include or the system found an incompatible header file.
I did acctually, this is what makes things really weird.
 
Old 05-07-2013, 11:43 PM   #4
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,946

Rep: Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524Reputation: 524
What's weird on a missing include? Give more info.
PS: stdio.h should be the first to include.
 
Old 05-08-2013, 04:47 AM   #5
cuiy0001
LQ Newbie
 
Registered: Oct 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
I have already solved the issue.
thank you all.
Just for your information, the problem is
the project was compiled against g++ while source file was suffixed with .c
just change it to .cpp.
SO neat.
 
Old 05-08-2013, 04:51 AM   #6
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,159

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
actually the information you gave was insufficient.....
 
  


Reply

Tags
ffmpeg


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
some kind of error... Blal0ck Fedora 2 02-07-2011 05:14 AM
installed windows xp on linux computer = error 17 - kind of solved :P k@rli Linux - Newbie 21 01-05-2011 09:23 AM
yast error installing packages of any kind netsurf Suse/Novell 1 06-15-2005 04:20 PM
kind of a programming quesion...kind of not tho jhorvath Programming 2 06-30-2003 11:05 PM
Confused about kernel compilation options toolkit Linux - General 3 11-21-2002 10:34 PM


All times are GMT -5. The time now is 10:43 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration