News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

MS COFF import library to module definition file converter

Started by Vortex, May 18, 2021, 03:15:39 AM

Previous topic - Next topic

Vortex

Hello,

Here is lib2def V2.2, my MS COFF import library to module definition file converter. A bug causing crash is now fixed. The tool can process 32-bit and 64-bit import libraries. lib2def accepts wildcards like *.lib

https://masm32.com/masmcode/vortex/files/lib2def22.zip

hutch--

This looks good Erol, thanks for posting this useful tool.  :thup:

JudeEngbretson

Is there a way to convert the COFF library (lib file) to OMF library for use with C ++ Builder6? This coff is not just an import library, it contains some code. When I try to convert it using borland coff2omf.exe I get a 1KB file from a 15KB file.

HSE

Hi Jude!

Quote from: JudeEngbretson on October 12, 2021, 10:55:44 PMIs there a way to convert the COFF library (lib file) to OMF library for use with C ++ Builder6? This coff is not just an import library, it contains some code. When I try to convert it using borland coff2omf.exe I get a 1KB file from a 15KB file.

You can try with Agner Fog ObjConv tool https://www.agner.org/optimize/#objconv
Equations in Assembly: SmplMath

Vortex

Hi JudeEngbretson,

HSE's suggestion to try Agner Fog's objconv is very good but you need to be careful with mixed libraries containing imports + code. Such "glued" libraries are not easy to maintain and they can be complicated. You should try objconv.

vitsoft

I didn't test it with Builder6 but my object convertor can cope with 16bit and 32bit object libraries with code + import information. Here is the linker script, if you want to give it a try:

OMFlibrary PROGRAM FORMAT=LIBOMF ; Convert COFF object library to OMF library.
             LINK "COFFlibrary.lib"
           ENDPROGRAM OMFlibrary


Execute the script with euroasm.exe script.asm