Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-25 Thread Pavel Stehule
2015-11-23 21:14 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > I am trying to build Orafce and I have problem due access to exported > > variable session_timezone. > > Any idea what can be broken? > > Lack of PGDLLIMPORT on the extern declaration,

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-25 Thread Pavel Stehule
2015-11-24 11:33 GMT+01:00 Kisung Kim : > 2015-11-24 8:12 GMT+09:00 Chapman Flack : > >> On 11/23/15 15:14, Tom Lane wrote: >> > Lack of PGDLLIMPORT on the extern declaration, no doubt. >> > >> > The fact that we've not heard this before implies that

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-24 Thread Pavel Stehule
Dne 24. 11. 2015 15:44 napsal uživatel "Chapman Flack" < c...@anastigmatix.net>: > > On 11/24/2015 05:33 AM, Kisung Kim wrote: > > 2015-11-24 8:12 GMT+09:00 Chapman Flack : > >> On 11/23/15 15:14, Tom Lane wrote: > >>> Lack of PGDLLIMPORT on the extern declaration, no doubt.

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-24 Thread Craig Ringer
On 24 November 2015 at 07:12, Chapman Flack wrote: > > What I (think I) took away from it was: > > 1. Un-PGDLLIMPORTed references to global *functions* work ok. > Maybe they are thunked and a little less efficient, but they work. > > 2. Un-PGDLLIMPORTed references to

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-24 Thread Craig Ringer
> > > I don't think that's necessary, per above. You just have to access the > vars via pointer indirection always, so long as *any* Pg version you > support has ever lacked dllexport or DEF entry, so you can't dllimport the > var. > > You could enable direct dllimport if PG_VERSION_NUM shows

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-24 Thread Tom Lane
Craig Ringer writes: > Actually, if __declspec(dllexport) or a .DEF entry was added in, say, > 9.4.5, you could probably just: > #if PG_VERSION_NUM < 90405 > extern int* log_min_messages_p; > #define log_min_messages (*log_min_messages_p) > #endif > after including all

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-24 Thread Craig Ringer
On 25 November 2015 at 13:36, Tom Lane wrote: > Craig Ringer writes: > > Actually, if __declspec(dllexport) or a .DEF entry was added in, say, > > 9.4.5, you could probably just: > > > #if PG_VERSION_NUM < 90405 > > extern int* log_min_messages_p; > >

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-24 Thread Kisung Kim
2015-11-24 8:12 GMT+09:00 Chapman Flack : > On 11/23/15 15:14, Tom Lane wrote: > > Lack of PGDLLIMPORT on the extern declaration, no doubt. > > > > The fact that we've not heard this before implies that either nobody has > > ever tried to use orafce on Windows, or it only

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-24 Thread Chapman Flack
On 11/24/2015 05:33 AM, Kisung Kim wrote: > 2015-11-24 8:12 GMT+09:00 Chapman Flack : >> On 11/23/15 15:14, Tom Lane wrote: >>> Lack of PGDLLIMPORT on the extern declaration, no doubt. >> > Actually, we encountered the situation before couple of months. > A client wanted to

[HACKERS] problem with msvc linker - cannot build orafce

2015-11-23 Thread Pavel Stehule
Hi I am trying to build Orafce and I have problem due access to exported variable session_timezone. The build fails with message: 1> Creating library C:\Users\Pavel\orafce-VERSION_3_1_2\orafce-VERSION_3_1_2\msvc\/bin/x64/9.4/lib/orafce.lib and object

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-23 Thread Tom Lane
Pavel Stehule writes: > I am trying to build Orafce and I have problem due access to exported > variable session_timezone. > Any idea what can be broken? Lack of PGDLLIMPORT on the extern declaration, no doubt. The fact that we've not heard this before implies that

Re: [HACKERS] problem with msvc linker - cannot build orafce

2015-11-23 Thread Chapman Flack
On 11/23/15 15:14, Tom Lane wrote: > Pavel Stehule writes: >> I am trying to build Orafce and I have problem due access to exported >> variable session_timezone. >> Any idea what can be broken? > > Lack of PGDLLIMPORT on the extern declaration, no doubt. > > The fact