无法打开包含文件:'unistd.h':没有这样的文件或目录 [英] Cannot open include file: 'unistd.h': No such file or directory

查看:727
本文介绍了无法打开包含文件:'unistd.h':没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在计算机中安装了 libpng 之后,我使用 #include< png.h> 在Windows 7 SP1平台上并使用Visual Studio Ultimate 2013。

After having installed libpng into my computer, I've included it into my project using #include <png.h> on a Windows 7 SP1 plateform and using Visual Studio Ultimate 2013.

但是在构建时,出现此错误:

But at build time, I'm getting this error:


C1083:无法打开包含文件:'unistd.h':无此类文件或目录

C1083: Cannot open include file: 'unistd.h': No such file or directory

如何解决此问题?我尚未在网络中找到任何解决方案?

How do I please to fix this? I haven't found yet any solution in the net?

推荐答案

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.

这篇关于无法打开包含文件:'unistd.h':没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆