什么是包括Windows上的SYS / times.h的方法吗? [英] What is an alternative to including sys/times.h on windows?

查看:1099
本文介绍了什么是包括Windows上的SYS / times.h的方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Windows上编译一些code有$​​ P $ pviously编译QNX的。根据本<一href=\"http://stackoverflow.com/questions/12749529/cannot-compile-c-$c$c-with-include-sys-times-h-in-cygwin\"标题=SO问题>太问题这 SO问,我可以通过简单地删除包括SYS / times.h语句解决这个问题。当我删除了,包括,我得到了一堆错误,说变量尚未范围内定义的。我想这是因为我已经删除了包括呼叫。

I am trying to compile some code on windows that has previously been compiled on QNX. According to this SO Question and this SO Question, I can resolve this issue by simply removing the include statements for sys/times.h. When I remove the includes, I get a bunch of errors saying that variables have not been defined within the scope. I assume this is because I have removed the include call.

什么是使用SYS / times.h在code这样我就可以在Windows上使用它的方法吗?

What is an alternative to using sys/times.h in the code so I can use it on windows?

  • 下载和安装Cygwin编译code - 我不能下载的cygwin由于网络的限制。我想preFER不要有下载我的家庭网络上的cygwin

推荐答案

下面的一个项目是如何解决这个问题:

Here's how one project solved the problem:

<一个href=\"https://$c$c.google.com/p/madp-win/source/browse/src/include/sys/times.h?r=4ef496e2071896b295262c89eb36a8b3d7656bae\" rel=\"nofollow\">https://$c$c.google.com/p/madp-win/source/browse/src/include/sys/times.h?r=4ef496e2071896b295262c89eb36a8b3d7656bae

他们使用各种包括适用于Windows在大部分填补,并定义其余的自己。您可能必须在codeBase的一点挖,如果你想看到其他两个函数的实现 - 注意,图书馆是LGPL

They use various includes available on Windows to fill in most of it, and define the rest themselves. You may have to dig in the codebase a bit if you want to see the implementations for the other two functions - note that the library is LGPL.

这篇关于什么是包括Windows上的SYS / times.h的方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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