Chinaunix首页 | 论坛 | 博客
  • 博客访问: 798729
  • 博文数量: 770
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4950
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-09 17:49
文章分类

全部博文(770)

文章存档

2011年(1)

2008年(769)

我的朋友

分类:

2008-10-10 11:37:35

#include
#include
#include
#include
#include
#include
main(int argc,char **argv)
{
        return 0;
}


$ 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---------------------

阅读(487) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~