int base=0x210; //base address
int x;
int main()
{
x=check_region(0x210,0x8);
if(x==0)
{
request_region(0x210,0x8,"AC1082");
int nDI;
nDI=inb(0x216);
}
else printf("ERROR");
return 0;
}
我想要对I/O进行操作,不知上面的方法是否正确?
在编译时,提示如下错误:
/tmp/ccqsb5EC.o(.text+0x1b): In function `main':
: undefined reference to `ioport_resource'
/tmp/ccqsb5EC.o(.text+0x20): In function `main':
: undefined reference to `__check_region'
/tmp/ccqsb5EC.o(.text+0x58): In function `main':
: undefined reference to `ioport_resource'
/tmp/ccqsb5EC.o(.text+0x5d): In function `main':
: undefined reference to `__request_region'
collect2: ld returned 1 exit status