QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 968|回复: 0

编译通不过,着急啊 ,谢谢各位大侠asm/uaccess.h

[复制链接]
发表于 2005-9-7 08:44:50 | 显示全部楼层 |阅读模式
以下是我编译字符驱动程序时怎么都通不过的,!不知道是什么原因 ,试过好多次了 ,还是没有成功!下面分别是三种编译方式,还是不行 ,哪位大侠有绝招!谢谢了 !

第一着:
[root@cslab1 root]# gcc -c lfqudong.c
lfqudong.c:10:25: asm/uaccess.h: 没有那个文件或目录
第二着:
[root@cslab1 root]# gcc -I/usr/src/linux-2.4.20-8/include/asm -c lfqudong.c
lfqudong.c:10:25: asm/uaccess.h: 没有那个文件或目录

第三着:

[root@cslab1 root]# gcc -I/usr/src/linux-2.4.20-8/include -c lfqudong.c
In file included from /usr/src/linux-2.4.20-8/include/linux/sched.h:16,
                 from /usr/src/linux-2.4.20-8/include/asm/uaccess.h:8,
                 from lfqudong.c:10:
/usr/src/linux-2.4.20-8/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/src/linux-2.4.20-8/include/linux/sched.h:23,
                 from /usr/src/linux-2.4.20-8/include/asm/uaccess.h:8,
                 from lfqudong.c:10:
/usr/src/linux-2.4.20-8/include/asm/mmu.h:12: field `sem' has incomplete type
In file included from /usr/src/linux-2.4.20-8/include/linux/sched.h:31,
                 from /usr/src/linux-2.4.20-8/include/asm/uaccess.h:8,
                 from lfqudong.c:10:
/usr/src/linux-2.4.20-8/include/linux/pid.h:18: field `task_list' has incomplete type
/usr/src/linux-2.4.20-8/include/linux/pid.h:19: field `hash_chain' has incomplete type
/usr/src/linux-2.4.20-8/include/linux/pid.h:24: field `pid_chain' has incomplete type
/usr/src/linux-2.4.20-8/include/linux/pid.h:36: parse error before '(' token
/usr/src/linux-2.4.20-8/include/linux/pid.h:38: parse error before '(' token
/usr/src/linux-2.4.20-8/include/linux/pid.h:43: parse error before '(' token
/usr/src/linux-2.4.20-8/include/linux/pid.h:49: parse error before '(' token
/usr/src/linux-2.4.20-8/include/linux/pid.h:52: parse error before '(' token
In file included from lfqudong.c:10:
/usr/src/linux-2.4.20-8/include/asm/uaccess.h: In function `verify_area':
/usr/src/linux-2.4.20-8/include/asm/uaccess.h:64: `current' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/asm/uaccess.h:64: (Each undeclared identifier is reported only once
/usr/src/linux-2.4.20-8/include/asm/uaccess.h:64: for each function it appears in.)
/usr/src/linux-2.4.20-8/include/asm/uaccess.h:64: `EFAULT' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/asm/uaccess.h: In function `__constant_copy_to_user':
/usr/src/linux-2.4.20-8/include/asm/uaccess.h:550: `current' undeclared (first use in this function)
/usr/src/linux-2.4.20-8/include/asm/uaccess.h: In function `__constant_copy_from_user':
/usr/src/linux-2.4.20-8/include/asm/uaccess.h:558: `current' undeclared (first use in this function)
lfqudong.c: At top level:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-25 22:51 , Processed in 0.040942 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表