Re: libpq not working

From: Gerhard Häring <haering_python(at)gmx(dot)de>
To: pgsql-cygwin(at)postgresql(dot)org
Cc: stefan(at)snobis(dot)de
Subject: Re: libpq not working
Date: 2002-04-21 09:31:29
Message-ID: 20020421093129.GA8080@lilith.my-fqdn.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

* Stefan Nobis <stefan(at)snobis(dot)de> [2002-04-07 14:29 +0200]:
> C:\Eigene Dateien\dbtest>t
> Connection failed!
> connectDBStart() -- socket() failed: errno=0
> No error

On Windows, you need to call WSAStartup before you can use any sockets:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecomm/htm/winsock_13.asp

I experienced exactly this problem in my first win32 libpq program, too.

Hmm. OTOH, this should be done automagically in libpqdll.c. Maybe I
linked statically at the time.

Gerhard
--
mail: gerhard <at> bigfoot <dot> de registered Linux user #64239
web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9 3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message freemembership 2002-04-21 14:36:45 Hey! Don't miss out on our FREE offer!
Previous Message Eduardo_Cadena 2002-04-19 13:27:39 Re: Where to download CygIPC?