This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mingw32 and winsocks


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]