From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Dave Page <dpage(at)pgadmin(dot)org> |
Subject: | Re: Compiling extensions on Windows |
Date: | 2014-01-11 08:58:03 |
Message-ID: | 52D1079B.8000404@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 01/06/2014 07:44 PM, Sandeep Thakkar wrote:
> Okay.
>
> BTW, I just checked that Windows 32bit installer ships the libintl.h.
> Did you try if it works for you? Or it requires more headers? Somehow,
> Windows 64bit installer installer missed it. I'll fix the build script.
Actually, on second thoughts there were two other issues. One I reported
separately (double-inclusion of pg_config_os.h due to _WIN32 vs WIN32).
The other is worth looking at here.
We don't set __declspec(dllexport) on extension functions automatically
when building stand-alone on Windows. So it's necessary to explicitly
specify PGDLLEXPORT for each function. We seem to work around this in
the Perl build toolchain by forcing export of everything not explicitly
static (which is, btw, a pretty crappy thing we should revisit in favour
of using PGDLLEXPORT and -fvisibility=hidden on Linux).
Instead we should perhaps be adding this automatically via a prototype
generated by PG_FUNCTION_INFO_V1, or adding PGDLLEXPORT to all our
example documentation. I think the latter is preferable because if we
start generating a prototype for the base function in PG_FUNCTION_INFO
when we didn't before it could break existing code.
Comments?
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2014-01-11 09:26:29 | Re: Add CREATE support to event triggers |
Previous Message | Craig Ringer | 2014-01-11 08:48:45 | Re: Compiling extensions on Windows |