Kernel Error Array Type Has Incomplete Element Type
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business array type has incomplete element type in c Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Error Array Type Has Incomplete Element Type Struct
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like array type has incomplete element type extern struct you, helping each other. Join them; it only takes a minute: Sign up C Compile Error: array type has incomplete element type up vote 3 down vote favorite #include
Array Type Has Incomplete Element Type Char
vote 9 down vote struct NUMBER array[99999]; should be NUMBER array[99999]; because you already typedefed your struct. EDIT: As OP is claiming that what I suggested him is not working, I compiled this test code and it is working fine: #include
fedora20 kernel compile asked 2014-11-08 20:56:31 +0000 Hoony 21 array has incomplete element type char ●4 updated 2014-11-09 16:40:23 +0000 mether 7023 ●41 ●67 incomplete array ●111 https://fedoraproject.org... Hi i'm .. hoon. Im doing kernel compile. But It does not
Array Type Has Incomplete Element Type Int
go two hours when 'make' instruction. Like this Error message. In file inscluded from include/linux/prefetch.h:13:0 from include/linux/list.h:7, from include/linux/signal.h:4, from arch/i386/kernel/asm-offsets.c:7: include/asm/processor.h:86:26: http://stackoverflow.com/questions/21080744/c-compile-error-array-type-has-incomplete-element-type error : array type has incomplete element type extern struct tss_struct init_tss[NR_CPUS]; In file included from include/linux/spinlock.h:39:0, from include/linux/singnal.h:5, from arch/i386/kernel/asm-offsets.c:7: include/asm/spinlock.h:10:12: error: confliciting types for 'printk' extern int printk(const char * fmt, ...) In file inscluded from include/asm/system.h:5:0, from include/asm/processor.h:18, from include/linux/prefetch.h:13, from include/linux/list.h:7, https://ask.fedoraproject.org/en/question/57503/kernel-compile-error-during-make/ from include/linux/signal.h:4, from arch/i386/kernel/asm-offsets.c:7: include/linux/kernel.h87:16: note previous declaration of 'printk' was here asmlinkage int prink(const char * fmt, ...) make[1]: *** [arch/i386/kernel/asm-offsets.s] error 1 make: *** [arch/i386/kernel/asm-offsets.s] error 2 Then i searched google. google people says..... # vi Makefile ARCH ?=arm CROSS_COMPILE ?= arm-linux Then i did #make mrproper but it doesnt work.. Error message is .. arm-linux-gcc command not found why..? my cpu is not arm ? then..i386? i686? ..? what is this T_T..? ah... linux is hell .. please help me .. edit retag flag offensive close merge delete 1 answer Sort by ยป oldest newest most voted 1 answered 2014-11-08 21:08:30 +0000 randomuser 4864 ●10 ●44 ●78 http://blog.randomuser.or... Try following the instructions at https://fedoraproject.org/wiki/Building_a_custom_kernel . edit flag offensive delete link more CommentsYeap. This wiki page I have followed and I b
kizeren Member Registered: 2006-10-20 Posts: 5 array type has incomplete element type [solved] Well, not quite sure where to ask this question. I have tried some MUD sites. All give two options for fixing the problem with this error. Neither https://bbs.archlinux.org/viewtopic.php?id=26210 which seem to work.First one is, extern const struct flag_type *act_flags; struct flag_type { ... };Second is,struct flag_type { ... }; extern const struct flag_type act_flags[];I have tried both these and still does not comiple.Now after searching for couple of hours on posts and the web, I found that this is the proper way for array declarations?extern const struct flag_type *mprog_flags;So now I have the correct syntax above and for the has incomplete actual array I have:const struct flag_type mprog_flags[] = { { "act", TRIG_ACT, TRUE }, { "bribe", TRIG_BRIBE, TRUE }, { "death", TRIG_DEATH, TRUE }, { "entry", TRIG_ENTRY, TRUE }, { "fight", TRIG_FIGHT, TRUE }, { "give", TRIG_GIVE, TRUE }, { "greet", TRIG_GREET, TRUE }, { "grall", TRIG_GRALL, TRUE }, { "kill", TRIG_KILL, TRUE }, { "hpcnt", TRIG_HPCNT, TRUE }, { "random", TRIG_RANDOM, TRUE }, { "speech", TRIG_SPEECH, TRUE }, { "exit", TRIG_EXIT, has incomplete element TRUE }, { "exall", TRIG_EXALL, TRUE }, { "delay", TRIG_DELAY, TRUE }, { "surr", TRIG_SURR, TRUE }, { NULL, 0, TRUE } };Since I have been told this is still the proper way to do the array itself.But again when I compile I get more errors like below.tables.c:493: error: conflicting types for 'mprog_flags' tables.h:96: error: previous declaration of 'mprog_flags' was here tables.c:542: error: conflicting types for 'exit_flags' tables.h:95: error: previous declaration of 'exit_flags' was here tables.c:569: error: conflicting types for 'room_flags' tables.h:93: error: previous declaration of 'room_flags' was hereNow is my problem that I have the array declaration in seperate file as the actual array? Or am I just completly missing it?I am using GCC Version 4.1.1.Thanks in advance for anyone who may know the answer and who take the time to read this post.I will be more then happy to share the code if anyone would be interested in helping me. Offline #2 2006-10-20 05:13:13 tardo Member Registered: 2006-07-15 Posts: 526 Re: array type has incomplete element type [solved] extern const struct flag_type *mprog_flags; I think that the only time you'd use extern is when accessing a function/variable in another file.const struct flag_type mprog_flags[] = { { "act", TRIG_ACT, TRUE }, { "bribe", TRIG_BRIBE, TRUE }, { "death", TRIG_DEATH, TRUE },