gpt4 book ai didi

static-libraries - 如何将 64 位 COFF 转换为 OMF?

转载 作者:行者123 更新时间:2023-12-04 07:24:57 28 4
gpt4 key购买 nike

我需要将 64 位 .lib 文件从 COFF 转换为 OMFCoff2Omf.exe 适用于 32 位库但给出...

ERROR: COFF error: FOOx64.lib
(coffread.cpp, 1637) : invalid machine type detected

...在 64 位库上。是否有用于此目的的更新工具或类似工具?

最佳答案

根据 Embarcadero 的文档:

Differences Between Clang-based C++ Compilers and Previous-Generation C++ Compilers

Object and Library File Format

  • BCC32 and its associated tools use OMF in .obj and .lib files.
  • Clang-based C++ compilers use ELF in .o and .a files.

This difference means, for example, that when you migrate a 32-bit Windows applications you must change references to .lib and .obj files to be .a and .o, respectively.

BCC64.EXE, the C++ 64-bit Windows Compiler

Compiled object file
ELF64 format

#pragma link

Do not specify the file extension (.ext) of modulename, as long as you are using default file types. The linkers assume the following default values for the file extension (.ext) of modulename:

  • .obj extension for BCC32
  • .o extension for:
    Clang-based C++ compilers
    BCCOSX

So if you omit the .ext, then the correct extension is automatically used according to your current target platform.

OMF 仅供 32 位编译器/链接器使用。 64 位编译器/链接器改用 ELF64。

关于static-libraries - 如何将 64 位 COFF 转换为 OMF?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31095280/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com