砍鬼子 发表于 2005-9-7 08:44:50

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

以下是我编译字符驱动程序时怎么都通不过的,!不知道是什么原因 ,试过好多次了 ,还是没有成功!下面分别是三种编译方式,还是不行 ,哪位大侠有绝招!谢谢了 !

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

第三着:

# 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:
页: [1]
查看完整版本: 编译通不过,着急啊 ,谢谢各位大侠asm/uaccess.h