Re: compilig libpq with borland 5.5

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "claudio lezcano" <claudiogmi(at)gmail(dot)com>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: compilig libpq with borland 5.5
Date: 2008-08-14 13:09:59
Message-ID: b42b73150808140609s2834fbcfv26dca08a46f5f208@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 14, 2008 at 9:02 AM, claudio lezcano <claudiogmi(at)gmail(dot)com> wrote:
> Thank you so much for the comments, he managed to advance the process of
> reconfiguring the directory compilation include Borland, however, has
> emerged another drawback, the problem has drawn up the following message:
>
> Error: Unresolved external '_pgwin32_safestat' referenced from C:\SOURCE
> POSTGRES 8.3\SRC\INTERFACES\LIBPQ\RELEASE\BLIBPQ.LIB|fe-connect
>
> Obs.: Static or dynamic libraries generated by the mvs can not be used to
> compile sources with bcc32, but works for MinGW and others, while trying to
> compile the following problem arises with bcc32:

You are correct about static libraries. If you have a 'COFF' (usually
microsoft in this context) static library, the only tool I know of to
get it working with the Borland stack is the Digital Mars COFF->OMF
converter, which works, and is the only way to go if you have a static
library which is not a stub for a dll (fully static) and don't
have/can't compile the source.

Dynamic libraries, however, can be shared between the compilers. You
can either load all the symbols with LoadLibrary, etc, or generate a
static library. Borland's implib.exe utility generates a static
library from any dll so you don't have to use LoadLibary, .etc, just
the header for the symbols from the library which you want to use.

Format problems between the compilers are one of the many reasons why
static libraries (except for statically loaded .dll) have fallen out
of favor...you hardly ever see them anymore.

merlin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-08-14 13:27:34 Re: Join Removal/ Vertical Partitioning
Previous Message claudio lezcano 2008-08-14 13:02:56 Re: compilig libpq with borland 5.5