微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Cygwin 找不到 termios.h

如何解决Cygwin 找不到 termios.h

我在 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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。