Re: ecpg generated files ignorable? - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: ecpg generated files ignorable?
Date
Msg-id 48663DA3.9060609@hagander.net
Whole thread Raw
In response to Re: ecpg generated files ignorable?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: ecpg generated files ignorable?  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera wrote:
> Michael Meskes wrote:
>> Well, in my source tree I have two, one for MS VC++ and one for Borland
>> C++ Builder. And yes, I can build a third one for MS VC++ as well by
>> just issuing the corresponding make call. However, I have no idea
>> whether we need both, the only differ in the lib name:
>> --- libecpgddll.def     2008-06-20 12:33:29.000000000 +0200
>> +++ libecpgdll.def      2008-06-20 12:33:16.000000000 +0200
>> @@ -1,5 +1,5 @@
>>  ; DEF file for MS VC++
>> -LIBRARY LIBECPGD
>> +LIBRARY LIBECPG
>>  EXPORTS
>>        ECPGallocate_desc                @ 1
>>        ECPGconnect                      @ 2
>>
>> Maybe someone with more Windows knowledge can explain this? Magnus?

(without looking at the actual code :-P):

LIBRARY should match the name of the DLL file. LIBECPGD is the debugging
version, which is the one linked against the debugging version of the
runtime. It needs to exist in any case where CRT pointers (FILE*,
va_args, things like that) is passed between DLLs. If one is linked
against release and one against debug, a crash will occur, so to build
you need to have a debug-linked version of the DLL as well.

Wow. That turned into quite a messy explanation, I hope it's readable :)

//magnus


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: stat() vs cygwin
Next
From: "Marko Kreen"
Date:
Subject: [patch] plproxy v2