Re: Help with User-defined function in PostgreSQL with Visual C++ - Mailing list pgsql-hackers

From Itagaki Takahiro
Subject Re: Help with User-defined function in PostgreSQL with Visual C++
Date
Msg-id AANLkTimeGKHTJ16vMgJ-VuU_6aGRvED-S103hYY=xBYX@mail.gmail.com
Whole thread Raw
In response to Re: Help with User-defined function in PostgreSQL with Visual C++  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Help with User-defined function in PostgreSQL with Visual C++
List pgsql-hackers
On Tue, Sep 28, 2010 at 3:53 PM, Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Li Jie
Date:
Subject: Parallel Query Execution Project
Next
From: Shigeru HANADA
Date:
Subject: Re: security label support, revised