【问题标题】:Is there an error in "msvcrt.dll", with Ruby compiler, on "Windows XP"?在“Windows XP”上使用 Ruby 编译器的“msvcrt.dll”是否有错误?
【发布时间】:2015-08-12 12:22:10
【问题描述】:

我正在使用 最新版本 Ruby;我已经下载了它,[从这里] (http://rubyinstaller.org/downloads/)。我的安装程序是:http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.2.exe

然后,我已将它安装到我的 Windows XP 计算机中。我正在使用 32 位 系统。

但是;当我运行ruby.exe 时,它总是返回这个错误信息:

The procedure entry point _gmtime64_s could not be located in the dynamic link library msvcrt.dll.

某些旧版本(1.9.3 之前的版本)可以在我的计算机上运行而不会出现此错误消息。

有什么建议可以解决这个错误吗?

【问题讨论】:

  • 给定 proc 入口点名称,我猜你已经下载了 64 位版本的 ruby​​,并试图在 32 位架构上运行它。
  • @d96p 我了解到您使用的是 32 位操作系统,但您可能下载了 64 位版本的 Ruby。确保您下载的文件的文件名中没有 x64。此外,您标记了 msvcrt。你能解释一下这是如何涉及的吗?您可能还想标记“windows”。 Ruby 总是很难在 Windows 上安装,所以不用担心。它很快就会起作用。
  • @mcfinnigan:这里的 64 表示 64 位 time_t
  • XP is not supported anymore by Ruby Installer,Ruby (MRI/CRuby) 本身仍然支持它。
  • 可能不相关,但 2.2.x 总体上在 Windows 上存在很多问题。试试 2.1.x?

标签: ruby windows-xp msvcrt


【解决方案1】:

错误消息为我们提供了我们需要的所有信息。可执行文件ruby.exe 链接到msvcrt.dllyou're not supposed to do that,但没关系),这是 Windows 本身使用的 C 运行时。

缺少的函数是_gmtime64_s,我们可以look up in MSDN。原来这个功能是在Visual Studio 2005中才添加的,也就是在Windows XP发布之后,所以Windows XP运行时没有包含它也就不足为奇了。

结论:你下载的ruby.exe版本至少需要Windows Vista。

【讨论】:

    猜你喜欢
    • 2010-09-17
    • 2014-05-22
    • 1970-01-01
    • 2021-01-15
    • 1970-01-01
    • 2010-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多