【问题标题】:Determining the CPU architecture of a static library (LIB) on Windows确定 Windows 上静态库 (LIB) 的 CPU 架构
【发布时间】:2011-03-20 08:30:21
【问题描述】:

我刚刚使用 VS2008 在 64 位 Windows 机器上构建了 libpng。它会在 \projects\visualc71\Win32_Lib_Release 目录中生成一个libpng.lib 文件(使用的配置是“LIB Release”)。

我使用dumpbin 来检查这个 LIB 文件:

C:\Temp\libpng-1.4.3>dumpbin projects\visualc71\Win32_LIB_Release\libpng.lib
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file projects\visualc71\Win32_LIB_Release\libpng.lib

File Type: LIBRARY

  Summary

         8E4 .debug$S
         DF2 .drectve
        2BCD .rdata
       21165 .text

C:\Temp\libpng-1.4.3>

但它没有显示 LIB 文件的体系结构。如何确定给定的 LIB 文件是为 32 位还是 64 位架构构建的?

【问题讨论】:

    标签: windows 64-bit static-libraries cpu-architecture libpng


    【解决方案1】:

    使用垃圾箱/headers

    机器类型几乎是你会得到的第一行。

    x86 为 14c,x64 为 8664

    n:>dumpbin lib642.lib /headers

    Microsoft (R) COFF/PE Dumper 版本
    10.00.30319.01 版权所有 (C) Microsoft Corporation。保留所有权利。

    文件 lib642.lib 的转储

    文件类型:图书馆

    文件头值 8664机器(x64

    或者

    n:>dumpbin Lib32.lib /headers

    Microsoft (R) COFF/PE Dumper 版本
    10.00.30319.01 版权所有 (C) Microsoft Corporation。保留所有权利。

    文件 Lib32.lib 的转储

    文件类型:图书馆

    文件头值 14C机(x86)

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-11-08
    • 1970-01-01
    • 1970-01-01
    • 2020-11-22
    • 1970-01-01
    • 2015-06-18
    • 2011-01-06
    相关资源
    最近更新 更多