且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法打开包含文件:'unistd.h':没有这样的文件或目录

更新时间:2023-02-23 08:23:19

unistd中的 uni代表 UNIX-您

The "uni" in unistd stands for "UNIX" - you won't find it on a Windows system.

使用最广泛的可移植库应提供替代的构建或检测平台,并且仅尝试使用将被使用的标头/函数。提供,因此值得检查文档以查看是否错过了一些构建步骤-例如也许运行 make而不是加载 .sln Visual C ++解决方案文件。

Most widely used, portable libraries should offer alternative builds or detect the platform and only try to use headers/functions that will be provided, so it's worth checking documentation to see if you've missed some build step - e.g. perhaps running "make" instead of loading a ".sln" Visual C++ solution file.

如果需要自己修复,请删除包含的内容并查看实际上是哪些功能需要,然后尝试查找Windows等效项。

If you need to fix it yourself, remove the include and see which functions are actually needed, then try to find a Windows equivalent.