This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: mingw32 and winsocks
- To: cygwin at sourceware dot cygnus dot com
- Subject: Re: mingw32 and winsocks
- From: Benjamin Riefenstahl <benny at crocodial dot de>
- Date: Thu, 14 Oct 1999 18:46:19 +0200
- Organization: Crocodial Communications EntwicklungsGmbH
- References: <001701bf1608$d0e23ba0$028891c2@shadow.sk>
Hi Marcel,
Marcel Mojžiš wrote:
> I have a question about using winsocks with mingw32. I compiled libpq
> frontend library using mingw32 (gcc 2.95). There was no problem with the
> [...]
> #include <stdio.h>
> #include <windows.h>
>
> void main() {
> if (gethostbyname("www.microsoft.com") == NULL) {
> printf("failed...");
> }
> }
I think you are missing a call to WSAStartup() here to initialize
WinSock.
so long, benny
======================================
Benjamin Riefenstahl (benny@crocodial.de)
Crocodial Communications GmbH
Ruhrstr. 61, D-22761 Hamburg, Germany
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com