Re: DLL export with mingw-w64: currently a no-op

From: "Johann 'Myrkraverk' Oskarsson" <johann(at)2ndquadrant(dot)com>
To: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DLL export with mingw-w64: currently a no-op
Date: 2011-05-03 10:45:49
Message-ID: op.vuwiun14uxs6vk@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 03 May 2011 09:32:29 -0000, Andrew Dunstan <andrew(at)dunslane(dot)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 and Services --+--
|
Blog: http://my.opera.com/myrkraverk/blog/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-05-03 12:14:55 Re: Predicate locking
Previous Message Dave Page 2011-05-03 09:42:30 Re: FDW table hints