$ gcc -o firsttest ./firsttest.c
In file included from /usr/include/linux/sched.h:13,
from ./firsttest.c:6:
/usr/include/linux/times.h:5: parse error before `clock_t'
/usr/include/linux/times.h:5: warning: no semicolon at end of struct or union
/usr/include/linux/times.h:6: warning: data definition has no type or storage class
/usr/include/linux/times.h:7: parse error before `tms_cutime'
/usr/include/linux/times.h:7: warning: data definition has no type or storage class
/usr/include/linux/times.h:8: parse error before `tms_cstime'
/usr/include/linux/times.h:8: warning: data definition has no type or storage class
In file included from /usr/include/linux/signal.h:5,
from /usr/include/linux/sched.h:25,
from ./firsttest.c:6:
/usr/include/asm/siginfo.h:48: parse error before `clock_t'
/usr/include/asm/siginfo.h:48: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:48: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:49: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:50: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:62: parse error before `}'
/usr/include/asm/siginfo.h:62: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:63: parse error before `}'
/usr/include/asm/siginfo.h:63: warning: data definition has no type or storage class
In file included from /usr/include/linux/sched.h:78,
from ./firsttest.c:6:
/usr/include/linux/time.h:9: redefinition of `struct timespec'
/usr/include/linux/time.h:17: redefinition of `struct timeval'
In file included from /usr/include/linux/timer.h:18,
from /usr/include/linux/sched.h:81,
from ./firsttest.c:6:
/usr/include/linux/spinlock.h:131: parse error before `*'
In file included from /usr/include/linux/sched.h:81,
from ./firsttest.c:6:
/usr/include/linux/timer.h:32: field `vec' has incomplete type
/usr/include/linux/timer.h:37: field `vec' has incomplete type
/usr/include/linux/timer.h:42: conflicting types for `timer_t'
/usr/include/time.h:94: previous declaration of `timer_t'
/usr/include/linux/timer.h:63: field `list' has incomplete type --------------------next--------------------- see this please:
******************************
#define __KERNEL__
#define MODULE
#include
int init_module(void)
{
printk("<1>Hello World\n");
return 0;
}
void cleanup_module(void)
{
printk("<1>Bye, Bye");
}
# gcc -c third.c
In file included from third.c:3:
/usr/include/linux/module.h:60: parse error before `atomic_t'
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:62: parse error before `}'
/usr/include/linux/module.h:62: warning: data definition has no type or storage class
/usr/include/linux/module.h:91: parse error before `}'
******************************
I am crazy!why does it happened to me?can module.h have any errors??? I do not belive it.These two questions puzzled me a whole day.I am a neophyte .Please don't treat me as this. --------------------next---------------------