【问题标题】:Is there a true 64-bit version of msvcr80.dll? If not, why not?是否有真正的 64 位版本的 msvcr80.dll?如果不是,为什么不呢?
【发布时间】:2011-07-01 21:13:55
【问题描述】:

我已阅读链接,该链接回答了是否有 64 位版本的 Visual Studios (Visual Studio 64 bit?)。简单的答案是,但 32 位 Visual Studio 开发环境可以生成 64 位可执行文件。

问题

1) 是否有 64 位版本的 Microsoft 可再发行库 msvcr80.dll?我已经在我的 Windows 7 64 位机器上安装了可再发行包,并且在 winsxs 子目录中找到的所有副本(总共 7 个)在其标题部分中表明它们是 32 位的。

2) 不是这样吗:

a) 32 位可执行文件无法加载 64 位 dll?

b) 64 位可执行文件无法加载 32 位 dll?

c) 如果所有版本的 msvcr80.dll 都是 tru) 32 位的,如每个版本的标题部分所示,那么使用 Visual Studio 构建的 64 位应用程序如何使用此版本的任何功能可再分发?

如果有人找到此文件 (msvcr80.dll) 的真正 64 位版本,即标题部分实际声明它是 64 位库的版本,请指向链接。

New: Added image of BeyondCompare Viewer to show contents of msvcr80.dll header section, indicating dll is targeted for 32 bit use...

【问题讨论】:

  • 在这里结束循环 - 发布后不久,我发现 64 位版本的 MS 可再发行组件是 msvcr100.dll,并且包含在最新版本的 Microsoft 的 SDK 中下载。
  • no.... "msvcr80.dll" 是 Visual Studio 2005 的(发布)运行时,WinSxS 目录中应该有一个 32 位的。我不知道2005是否有64位版本,但如果有,它会在系统目录中。 “msvcr100.dll”是 Visual Studio 2010 的(发布)运行时,它在 WinSxS 中也应该有 32 位,在系统目录中应该有 64 位。
  • @MooingDuck - 不确定no.... 在您的评论中指的是什么。我使用了 msvcr100.dll,它是从可下载的 Microsoft Windows 7 SDK 中获得的。我同意它与 Visual Studios 等开发环境一起分发,但也可以在 SDK 中使用。 (我在一小时左右前编辑了这篇文章,只是为了指出如果人们需要 64 位 msvcrxxx.dll 而没有完整的 MS Visual Studios,他们可以从哪里获得)
  • no... 指的是当“msvcr80.dll”是 32 位时“msvcr100.dll”不是 64 位版本。他们不以那种方式对应。您必须使用与用于构建可执行文件的 Visual Studio 匹配的 dll 版本号。
  • @MooingDuck - 啊....我似乎得出了一些错误的结论。我上面的陈述具有误导性。谢谢,我会编辑的。谢谢。

标签: c++ visual-studio-2010


【解决方案1】:

Beyond Compare 没有使用 PE 标头来显示它 - 它使用的是版本资源,x64 msvcr80.dll 的 FILEOS 版本资源的值 VOS_NT_WINDOWS32(据我所知没有VOS_NT_WINDOWS64)。

使用dumpbin /headers(或link /dump /headers)获取有关PE 标头的信息。您将看到 x64 DLL 具有以下信息:

FILE HEADER VALUES
            8664 machine (x64)

【讨论】:

    【解决方案2】:

    我想指出 msvcr80.dll 是 Visual Studio 2005 的 crt 运行时,而不是您的标签所示的 Visual Studio 2010。

    winsxs amd64_xxx中的dll是win64 dll。这是我系统上 dll 的垃圾箱:

    C:\Windows\winsxs\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1833_none_88de3f632fb047bc>dumpbin /headers msvcr80.dll Microsoft (R) COFF/PE Dumper Version 10.00.40219.01 Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file msvcr80.dll
    
    PE signature found
    
    File Type: DLL
    
    FILE HEADER VALUES
                8664 machine (x64)
                   6 number of sections
            482BAB54 time date stamp Thu May 15 15:17:40 2008
                   0 file pointer to symbol table
                   0 number of symbols
                  F0 size of optional header
                2022 characteristics
                       Executable
                       Application can handle large (>2GB) addresses
                       DLL
    

    这是一个32位版本的dumpbin:

    C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1833_none_d08b763a442c70c2>dumpbin /headers msvcr80.dll
    Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    
    Dump of file msvcr80.dll
    
    PE signature found
    
    File Type: DLL
    
    FILE HEADER VALUES
                 14C machine (x86)
                   5 number of sections
            482BB294 time date stamp Thu May 15 15:48:36 2008
                   0 file pointer to symbol table
                   0 number of symbols
                  E0 size of optional header
                2102 characteristics
                       Executable
                       32 bit word machine
                       DLL
    

    对于 2) 的答案

    32位应用程序无法加载64位dll,64位应用程序无法加载32位dll。

    详情请见MSDN 64bit Process Interoperability

    【讨论】:

      【解决方案3】:
      1. 目前还没有 64 位版本的 Visual Studio,所有 VS 都只有 32 位。
      2. VS 能够构建和调试 64 位可执行文件。
      3. 如果您的操作系统是 64 位,这并不意味着您需要 64 位 VC 运行时来运行应用程序。如果应用程序是 32 位的,则需要 32 位运行时,而不是 64 位运行时。如果应用程序是 64 位的,是的,你肯定需要 64 位的 VC Runtime。
      4. VC 运行时必须与您用于构建二进制文件的版本(VC8、VC9 或 VC10)相匹配。它还必须与服务包匹配。
      5. 32 位二进制文​​件有 4 个字节寻址,因此 32 位进程无法加载 64 位 DLL。反过来也一样。

      【讨论】:

        猜你喜欢
        • 2012-04-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-12-03
        • 2017-06-23
        • 2023-03-18
        • 2011-11-12
        • 2011-04-09
        相关资源
        最近更新 更多