问题描述
我在 windows 10 64 位上使用代码块 20.03,使用 cygwin32 位,我试图包含 #include <termios.h>
位它给我 Fatal error: sys/termios.h: No such file or directory
我认为 cygwin 会有 termios 并且我可以默认包含它,根据 this reply 。
解决方法
寻找合适的 devel
包:
$ cygcheck -p "sys/termios.h"
Found 11 matches for sys/termios.h
cygwin-devel-3.0.7-1 - cygwin-devel: Core development files
...
cygwin-devel-3.1.7-1 - cygwin-devel: Core development files
cygwin-devel-3.2.0-0.1 - cygwin-devel: Core development files
...
安装包含所有 cygwin 头文件的 cygwin-devel
包
$ cygcheck -c cygwin-devel
Cygwin Package Information
Package Version Status
cygwin-devel 3.1.7-1 OK
$ cygcheck -l cygwin-devel |grep termios
/usr/include/termios.h
/usr/include/machine/termios.h
/usr/include/sys/termios.h