C、Cygwin,以及编译 drand 和 srand

发布于 2024-08-31 20:15:14 字数 427 浏览 0 评论 0原文

我有一个 C 代码,我试图在 Cygwin 中编译它,其中包含 drand()srand() 函数。我安装了 Windows Vista 并安装了 Cygwin,代码似乎可以正常编译,但我的计算机坏了,我必须买一台新计算机。新电脑装有Windows 7 64位版本。我在下载 Cygwin 时遇到了一些问题,但最终只选择了几个软件包就成功了,然后一直尝试获取我需要的其余部分。问题是我没有在另一台计算机上安装它的帮助,所以我不知道我实际需要哪些软件包,所以我只是在猜测(所有 gcc 软件包),但我不能有那个软件包我需要 srand 和 drand 才能工作。如果有人能指出我正确的方向,并且可能只是让我知道我需要编译 C 的哪些软件包,以便我可以检查我是否拥有它们,那就太好了。

预先非常感谢您的帮助。

抱歉,说了很多话!

凯蒂亚娜

I have a C code which I am trying to compile in Cygwin and which contains both the drand() and srand() functions. I had Windows Vista with Cygwin installed and the code seemed to comile fine, but my computer broke and I had to get a new one. The new computer has Windows 7 64-bit version. I had a few issues downloading Cygwin but finally managed to do it by only selecting a few packages and then have been trying to get the rest that I need. The problem is I don't have the help I had installing it on my other computer so I don't know which packages I actually need, so I have just been guessing (all the gcc ones) but I mustn't have the one I need for srand and drand to work. If anyone could point me in the right direction, and also possibly just let me know which packages I need to compile C so I can check I have them all that would be great.

Thanks a lot in advance for any help.

Sorry, that was a lot of words!

Kaytiana

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拥抱没勇气 2024-09-07 20:15:14

srand()drand() 函数是 库的一部分,应包含在 gcc-core cygwin 中包裹。如果不是,那么我认为这将是 cygwin 64 位软件包或操作系统的问题。既然您提到安装时遇到问题,我假设过程中出了问题。

srand() and drand() functions are part of the <stdlib.h> library and should be included with the gcc-core cygwin package. If no, then I think it will be an issue with cygwin 64 bit packages or the OS. Since you mentioned you had problems installing, I am assuming something went wrong on the process.

少女净妖师 2024-09-07 20:15:14

drand 不保证是 C 标准库的一部分。话虽这么说,我会首先安装所有相关的 stdlib 和 gcc 库。我无法想象存在一个单独的 drand 图书馆。

drand is not guaranteed to be part of the C standard library. That being said, I would install all of the relevant stdlib and gcc libraries first. I can't imagine a separate drand library existing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文