Re: Compiling extensions on Windows

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Compiling extensions on Windows
Дата
Msg-id 52D1079B.8000404@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Compiling extensions on Windows  (Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>)
Ответы Re: Compiling extensions on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Compiling extensions on Windows
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Add CREATE support to event triggers