开发者

Problem in referencing the outportb() function In C

I have a code in which am trying to use outportb(), but while compiling it on MinGw i am getting below error.

C:\Users\A_TOMAR开发者_C百科\AppData\Local\Temp\ccYPvctv.o:dsp.c:(.text+0x68): undefined reference to `outportb'
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>

int main(void)
{
  outportb(0x378,0xFF);
  return 0;
} 

I would like to know which header file is having this particular function?


  1. Windows doesn't provide access to a hardware. You should use Win32 API calls.
  2. This function is DOS specific and unavailable in Windows

Googling shows that your solution is inpout32.dll (example with weird font color)


#include <pc.h>
void outportb(unsigned short _port, unsigned char  _data);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜