LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-10-2007, 03:08 AM   #1
gopal229
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
Array type has incomplete type


hi all
i m using Suse 10.2, my gcc complier version is 4.1.2. while compiling the code ffmpeg source code i am getting error as "Array type has incomplete type". can any one suggest me how to rectify that error.
 
Old 10-11-2007, 12:39 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi, and welcome to LQ!

Probably not w/o having seen the faulty code.


Cheers,
Tink


P.S.: This question is better of in our programming forum,
and I'm moving it there.
 
Old 10-13-2007, 03:23 PM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Normally that error only occurs when you declare a struct/class without defining it then try to construct something with it:
Code:
struct my_struct;

void function1()
{ my_struct my_incomplete_array[10]; }

struct my_struct {};

void function2()
{ my_struct my_complete_array[10]; }
This is because without the structure definition the compiler doesn't know what size it is, and therefore doesn't know how to line up stack offsets when referencing variables, etc.
ta0kira
 
Old 10-16-2007, 12:23 AM   #4
gopal229
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
pls go thru the code

the following is a piece of code, where i am getting error"Array type has incomplete type" in line 3 &7

struct AVOption;
#ifdef HAVE_MMX
extern const struct AVOption avoptions_common[3 + 5];
#else
extern const struct AVOption avoptions_common[3];
#endif
extern const struct AVOption avoptions_workaround_bug[11];
 
  


Reply



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
Array type has incomplete element type Emsie Linux - Software 9 01-04-2007 06:59 AM
"array type has incomplete element type" compiling 2.4.32 kernel Akabaka Linux - General 1 01-08-2006 12:48 PM
redeferenced pointer to incomplete type Aldair1808 Programming 1 11-28-2005 03:23 PM
arrays of elements with [gcc4]array type has incomplete element type lmmix Linux - Software 0 02-26-2005 08:07 AM
Incomplete type ChemicalBurn Programming 4 02-24-2005 08:44 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:06 PM.

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
Open Source Consulting | Domain Registration