Re: libpq not working - Mailing list pgsql-cygwin

From Gerhard Häring
Subject Re: libpq not working
Date
Msg-id 20020421093129.GA8080@lilith.my-fqdn.de
Whole thread Raw
In response to libpq not working  (Stefan Nobis <stefan@snobis.de>)
List pgsql-cygwin
* Stefan Nobis <stefan@snobis.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')))

pgsql-cygwin by date:

Previous
From: Eduardo_Cadena@praxair.com
Date:
Subject: Re: Where to download CygIPC?
Next
From: freemembership@aol.com ()
Date:
Subject: Hey! Don't miss out on our FREE offer!