Pelles C forum

Pelles C => General discussions => Topic started by: melsmith on June 10, 2020, 10:41:22 pm

Title: Record Type in Pelles Librairies (OMF or COFF or what ?)
Post by: melsmith on June 10, 2020, 10:41:22 pm
Hi All:

   I'm trying to link a library (built with a Borland Compiler BCC 7.4) with a small app built with Pelles64.

   I *think* that the record type within my BCC small library is incompatible with the record type needed for Pellesc64.

   *If* that is so, how to I construct my BCC library so that it is able to be linked with my Pelles app.

Thanks,
-Mel Smith
Title: Re: Record Type in Pelles Librairies (OMF or COFF or what ?)
Post by: Akko on June 11, 2020, 08:39:48 am
32-bit library for a 64-bit compiler? If it's a DLL, there is a Windows restriction too.
Title: Re: Record Type in Pelles Librairies (OMF or COFF or what ?)
Post by: frankie on June 11, 2020, 10:34:48 am
PellesC use 'PECOFF' object format (that is a deviated type of standard COFF) developed by MS.
You can convert OMF libraries to PECOFF using the POLIB utility. From PellesC help:
Code: [Select]
Convert an OMF import library to COFF with POLIB [4.00]

You can use POLIB to convert an import library in OMF format (Borland) to COFF (Pelles C, Microsoft). When you do, use the following syntax:
POLIB OMF-library /OUT:library

The OMF-library argument specifies the name of an import library in OMF format.
The result will be written to the file named library.
Always read help please.
Of course, as Akko said, you can't link 32bits and 64bits code (but I immagine you meant 64bit compiler not generated code).
Title: Re: Record Type in Pelles Librairies (OMF or COFF or what ?)
Post by: Vortex on June 12, 2020, 07:02:19 pm
Hi melsmith,

You can also use Agner Fog's objconv tool to do the OMF to COFF convertion :

https://www.agner.org/optimize/#objconv