Thread: PG 7.2.3, libpq.lib, libpqdll.lib, WIN32 (native), WSAStartup error,

PG 7.2.3, libpq.lib, libpqdll.lib, WIN32 (native), WSAStartup error,

From
"Hatger, Carsten"
Date:
hi over there,

I'm not quite sure, wether I'm right or not.
It seems there's a bug/missing feature in the WIN32 (native) specific part of libpq.
If one wants to use the statically linked version of libpq, WSAStartup (in libpqdll.c) never gets called and subsequent
actionswill fail. In fact WSAStartup only is called when linking to libpqdll.lib. 

Any comments?
C. Hatger

--
name: carsten hatger
addr: universität hannover
addr: institut für kartographie und geoinformatik
addr: appelstrasse 9a
addr: 30167 hannover
 tel: +49 511 762-3726
 fax: +49 511 762-2780
mail: carsten.hatger@ikg.uni-hannover.de
 web: http://www.ikg.uni-hannover.de


Re: PG 7.2.3, libpq.lib, libpqdll.lib, WIN32 (native), WSAStartup error,

From
"Dave Page"
Date:

> -----Original Message-----
> From: Hatger, Carsten [mailto:Carsten.Hatger@ikg.uni-hannover.de]
> Sent: 23 October 2002 19:24
> To: pgsql-cygwin
> Subject: [CYGWIN] PG 7.2.3, libpq.lib, libpqdll.lib, WIN32
> (native), WSAStartup error,
>
>
> hi over there,
>
> I'm not quite sure, wether I'm right or not.
> It seems there's a bug/missing feature in the WIN32 (native)
> specific part of libpq. If one wants to use the statically
> linked version of libpq, WSAStartup (in libpqdll.c) never
> gets called and subsequent actions will fail. In fact
> WSAStartup only is called when linking to libpqdll.lib.
>
> Any comments?

I got caught by that a couple of weeks ago when I started on pgAdmin
III. I must admit I didn't think anything of it at the time and just
#ifdef'd the call into my code.

I'm wondering if the reason it's not there is because unlike the dll,
there is not dllmain() that is automatically run, hence the best that
could be included is a wrapper function that just calls WSAStartup? You
might as well just call it yourself...

Regards, Dave.