From: | Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Esteban Zimanyi <estebanzimanyi(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Help with User-defined function in PostgreSQL with Visual C++ |
Date: | 2010-09-28 07:26:23 |
Message-ID: | AANLkTimeGKHTJ16vMgJ-VuU_6aGRvED-S103hYY=xBYX@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 28, 2010 at 3:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> As I mentioned, we don't need the marks in our build environment at all.
>
> In that case, anybody who does need it should fix their build
> environment.
>
> I grow really weary of the idea that we should submit to arbitrary
> amounts of uglification of our source code so that it will deal with
> this week's Windows oddness. The Windows folk need to be willing to
> do a bit of work on their end.
Windows has 3 levels of function visibilities in a DLL:
1. exported from the DLL
2. module global, but not exported
3. static (private in file), of course not exported
On UNIXes, 2 is always 1. So we don't have to distinguish between
global and exported functions. But standard DLL projects on Windows
require marking which functions should be exported.
I'm not sure why we can build modules without any EXPORT marks,
though we can do it actually... It is very unnatural on Windows.
If we want to avoid adding PGDLLEXPORTs, we could have "sample MSVC
project with proper settings" in tutorial or documentation instead.
It should be opened with VC++ GUI (not from command line!) and can
be generate DLLs in the same way we're using to build the core.
--
Itagaki Takahiro
From | Date | Subject | |
---|---|---|---|
Next Message | Shigeru HANADA | 2010-09-28 07:57:45 | Re: security label support, revised |
Previous Message | Tom Lane | 2010-09-28 06:53:48 | Re: Help with User-defined function in PostgreSQL with Visual C++ |