Windows 我不能在cygwin64中使用termios.h

Windows 我不能在cygwin64中使用termios.h,windows,cygwin,termios,Windows,Cygwin,Termios,我正在制作一个应用程序,我认为我需要使用termios.h,但我有windows 10。我安装了cygwin64。我在终端中键入gcc test.c-o test.exe。我仍然收到致命错误:termios.h:没有这样的文件或目录#include安装期间我必须做些什么 代码只是打印hello world,但我包含了termios.h #包括 #包括 int main(){ printf(“你好,世界!”); 返回0; } 而不是这个: #包括 这: #包括安装缺少的开发包。要查找哪个是,请使用

我正在制作一个应用程序,我认为我需要使用
termios.h
,但我有windows 10。我安装了cygwin64。我在终端中键入
gcc test.c-o test.exe
。我仍然收到
致命错误:termios.h:没有这样的文件或目录#include
安装期间我必须做些什么

代码只是打印hello world,但我包含了
termios.h

#包括
#包括
int main(){
printf(“你好,世界!”);
返回0;
}
而不是这个:

#包括

这:


#包括

安装缺少的开发包。要查找哪个是,请使用
cygcheck

$ cygcheck -p usr/include/termios.h
Found 12 matches for usr/include/termios.h
cygwin-devel-3.0.7-1 - cygwin-devel: Core development files
...
cygwin-devel-3.2.0-0.1 - cygwin-devel: Core development files
cygwin-devel-3.2.0-1 - cygwin-devel: Core development files
...
您需要
cygwin-devel

$ cygcheck -l cygwin-devel |grep termios.h
/usr/include/termios.h
/usr/include/machine/termios.h
/usr/include/sys/termios.h
看看你的例子

$ cat prova.c
#include <stdio.h>
#include <termios.h>

int main(){
     printf("Hello World!");

     return 0;
}
这个例子构建得很好

$ gcc -Wall prova.c -o prova
$ ./prova
Hello World!

第二个命令回答错误,然后我尝试了
/usr/include/termios.h
没有这样的文件或目录来安装任何软件包。Cygcheck用于安装软件包后的检查。请稍候,抱歉。我安装了这个软件包并运行了
cygcheck-l cygwin devel | grep termios.h
它在您显示的目录中找到了它,但是当我运行
gcc test.c-o text.exe
时,我遇到了同样的错误请显示代码以及您是如何编译它的添加代码,只是hello world,但我加入了
termios.h
我打开cygwin64,在进入测试文件所在的目录后键入
gcc test.c-o text.exe
$ gcc -Wall prova.c -o prova
$ ./prova
Hello World!