我是 Windows 编程新手,我正在寻找相当于 Unix"file"命令的命令,我可以在编译对象(包括 .lib 文件和可执行文件)上运行该命令,以发现它们的编译位数。例如,在我的 Mac 上我可以运行:
file /usr/bin/python /usr/bin/python: Mach-O universal binary with 3 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture ppc7400): Mach-O executable ppc
我可以运行任何命令来检查 Windows 上的编译对象吗?也许是 Visual Studio 的一部分?
最佳答案
对于托管二进制文件,您可以使用 corflags command 。它将转储托管二进制文件的类似信息
C:\Users\jaredpar\winconfig> corflags .\Utils\Reflector\Reflector.exe
Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Version : v1.0.3705
CLR Header: 2.0
PE : PE32
CorFlags : 9
ILONLY : 1
32BIT : 0
Signed : 1
关于windows - Visual Studio 相当于 Unix 'file' 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3411985/