I need to convert a 64bit .lib file from COFF to OMF. Coff2Omf.exe works fine with 32bit libs but gives...
ERROR: COFF error: FOOx64.lib
(coffread.cpp, 1637) : invalid machine type detected
...on a 64bit lib. Is there an updated tool or similar to use for this?
Per Embarcadero's documentation:
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:
.objextension for BCC32.oextension for:
Clang-based C++ compilers
BCCOSXSo if you omit the
.ext, then the correct extension is automatically used according to your current target platform.
OMF is only used by the 32bit compiler/linker. The 64bit compiler/linker uses ELF64 instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With