LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 739|回复: 3

求助!

[复制链接]
发表于 2003-8-24 11:01:42 | 显示全部楼层 |阅读模式
各位大虾你们好!我是一名新手。最近在编译一个模块时遇到了下列问题不知该如何解决?请各位大虾多多指教!我通过命令:gcc -Wall -DMODULE -D__KERNEL__ -c idcn.c编译的:终端显示如下:
idcn.c:In function 'idcn_open':
idcn.c:35:warning:implicit declaration of function 'check_region'
idcn.c:39:warning:implicit declaration of function 'request_region'
idcn,c:In function 'idcn_write':
idcn.c:62:warning:implicit declaration of function 'outb_p'
idcn.c:85:warning:implicit declaration of function 'inb_p'
idcn,c:In function 'cleanuup_module':
idcn.c:184:warning:implicit declaration of function 'release_region'
我不知该如何解决,请指教!
发表于 2003-8-24 13:41:53 | 显示全部楼层
那应该是你 缺少/忘了包含 某个头文件。
去找一下那个*.h文件里有 check_region ... 的定义,include在 idcn.c里。
发表于 2003-8-24 15:18:55 | 显示全部楼层
Warning 应该没多大问题。编译通过了没有?
 楼主| 发表于 2003-8-25 09:16:30 | 显示全部楼层
对不起。是少了两个头文件!加上后就能编译通过了。但是新的问题是我在加载模块时又出现如下错误:unresolved symbol outb_p。后来我重新进行编译,编译时加上了-O选项,再加载就能加载上了。可是我记得只有用户空间代码使用inb及相关函数时,才需要在编译时带-O。而我这里是一个设备驱动程序啊。请多多指教
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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