确定 Windows 上静态库 (LIB) 的 CPU 体系结构

发布于 2024-09-10 20:45:53 字数 663 浏览 1 评论 0原文

我刚刚使用 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 位架构构建的?

I just built libpng on a 64-bit Windows machine using VS2008. It produces a libpng.lib file inside the \projects\visualc71\Win32_Lib_Release directory (Configuration used being "LIB Release").

I used dumpbin to inspect this LIB file:

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>

It does not however show the architecture of the LIB file. How do I find if a given LIB file is built for 32-bit or 64-bit architecture?

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

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

发布评论

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

评论(1

银河中√捞星星 2024-09-17 20:45:53

使用 dumpbin /headers

机器类型几乎是您将得到的第一行。

x86 为 14c,x64 为 8664

n:>dumpbin lib642.lib /headers

Microsoft (R) COFF/PE 转储程序版本
10.00.30319.01 版权所有 (C) Microsoft Corporation。保留所有权利。

文件 lib642.lib 的转储

文件类型:库

文件头值
8664 机器(x64

n:>dumpbin Lib32.lib /headers

Microsoft (R) COFF/PE 转储程序版本
10.00.30319.01 版权所有 (C) Microsoft Corporation。保留所有权利。

文件 Lib32.lib 的转储

文件类型:库

文件头值
14C机器(x86)

Use dumpbin /headers

The machine type is almost the first line you'll get.

It will be 14c for x86 and 8664 for x64

n:>dumpbin lib642.lib /headers

Microsoft (R) COFF/PE Dumper Version
10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file lib642.lib

File Type: LIBRARY

FILE HEADER VALUES
8664 machine (x64

Or

n:>dumpbin Lib32.lib /headers

Microsoft (R) COFF/PE Dumper Version
10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved.

Dump of file Lib32.lib

File Type: LIBRARY

FILE HEADER VALUES
14C machine (x86)

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