引用outportb()函数的问题在C中

我有一个代码,我试图使用outportb(),但在MinGw上编译它时,我得到的错误。

C:\Users\A_TOMAR\AppData\Local\Temp\ccYPvctv.o:dsp.c:(.text+0x68): undefined reference to `outportb' 
 #include  #include  #include  int main(void) { outportb(0x378,0xFF); return 0; } 

我想知道哪个头文件具有此特定function?

  1. Windows无法访问硬件。 您应该使用Win32 API调用。
  2. 此function是DOS特定的,在Windows中不可用

谷歌搜索显示您的解决方案是inpout32.dll( 具有奇怪的字体颜色的示例 )

 #include  void outportb(unsigned short _port, unsigned char _data);