Re: DLL export with mingw-w64: currently a no-op - Mailing list pgsql-hackers

From Johann 'Myrkraverk' Oskarsson
Subject Re: DLL export with mingw-w64: currently a no-op
Date
Msg-id op.vuwiun14uxs6vk@localhost
Whole thread Raw
In response to Re: DLL export with mingw-w64: currently a no-op  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: DLL export with mingw-w64: currently a no-op
List pgsql-hackers
On Tue, 03 May 2011 09:32:29 -0000, Andrew Dunstan <andrew@dunslane.net>  
wrote:

> On 05/03/2011 02:46 AM, Johann 'Myrkraverk' Oskarsson wrote:
>>
>> When compiling PG with mingw-w64 the PGDLLEXPORT macro is blank.
>>
>> Here is a patch that "fixes it for me."  If this is correct, I'd
>> appreciate it will be applied to 9.0.x as well as HEAD.
>
> AFAICT it's not broken and doesn't need fixing. We don't define this for  
> the 32 bit MinGW compiler, so why should it be necessary in the 64 bit  
> case?

I am using a different build procedure for 64bit than 32bit, as adviced
by the mingw-w64 team.  The final step I use is:  ${CC} -shared -o ${plugin} ${OBJS} ${BE_DLLLIBS} -L. -ljvm

I guess that is my "issue."  Without __declspec(dllexport) in the magic
macro Pg_magic_func() isn't exported properly because of that, for ex-
ample.

Now while I can only blame myself for using something different/un-
supported, I have to ask, why was I told to use gcc in the final
link step by the mingw-w64 team while you (postgres) use something
else (I presume dlltool)?


--   Johann Oskarsson                http://www.2ndquadrant.com/    |[]  PostgreSQL Development, 24x7 Support, Training
andServices  --+--                                                                 |  Blog:
http://my.opera.com/myrkraverk/blog/


pgsql-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: FDW table hints
Next
From: "Kevin Grittner"
Date:
Subject: Re: Predicate locking