How are the Clarion .lib files structered?

Just as the title suggest, how are Clarion’s .lib files structered?

I get that it’s different from MSVC generated .lib files, but in what way?

I am asking this as I am looking to expand the DNNE library for C# with the functionality to generate the needed files for Clarion - already got the .clw and .inc working - only part missing is the .lib file to link everything together - sadly LibMaker doesn’t (at least by default) support command line as far as I can see. So I want to transfer this logic into C# instead and generate it there as I already have a list of the methods and their signatures etc (needed for the .clw and .inc).

I tried looking at the source of LibMaker itself, but not getting any wiser about the specs of the format.

LIB files can be used for 2 generally different purposes:

  • to be a container for set of object files which are result of compilation of source files
  • to give information to the linker about symbols exported from DLLs

LIB files can be of different formats. CW uses LIB and OBJ files of the OMF format. Another format of LIB files in Windows world is COFF/PE which is more wide using now. VS produces LIB files of the COFF/PE format, for C# in that number.

LibMaker handles LIB files of both kinds having the OMF format only. There converters from the OMF to COFF/PE format.

Sadly one cannot use the LIB file with COFF/PE format in Clarion - Clarion uses the OMF and OMF format only - but good to know it’s a general format, not a custom one…

Got it generating the LIB file, sadly CW doesn’t recognize it yet as it differs a little bit and can’t figure out why yet

My Libmaker has command line control
ClarionCommunity/MGLibMkr.clw at master · MarkGoldberg/ClarionCommunity (

I don’t think the @CarlBarnes version of the libmaker supports command line, but it would be an easy addition.
CarlTBarnes/LibMakerPlus: LibMaker Plus was made for CIDC 2019. It started as MG LibMaker and I added many features (

The LibMaker can convert .LIB from COFF to OMF

1 Like