NO

Author Topic: Record Type in Pelles Librairies (OMF or COFF or what ?)  (Read 3576 times)

melsmith

  • Guest
Record Type in Pelles Librairies (OMF or COFF or what ?)
« 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

Offline Akko

  • Member
  • *
  • Posts: 31
Re: Record Type in Pelles Librairies (OMF or COFF or what ?)
« Reply #1 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.

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Record Type in Pelles Librairies (OMF or COFF or what ?)
« Reply #2 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).
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Vortex

  • Member
  • *
  • Posts: 864
    • http://www.vortex.masmcode.com
Re: Record Type in Pelles Librairies (OMF or COFF or what ?)
« Reply #3 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
Code it... That's all...