Xref: news2.mv.net comp.os.msdos.djgpp:6850 From: Ritzert AT t-online DOT de (Michael Ritzert) Newsgroups: comp.os.msdos.djgpp Subject: Problems with Winsock-programming Date: 3 Aug 1996 07:40:19 GMT Organization: Telekom Online Internet Gateway Lines: 40 Message-ID: <4tuvp3$lua@news00.btx.dtag.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi! I'm using the Cygnus port of DJGPP for programming under Windows. Most of my test programs compile and run fine, except the Winsock test: ------ #include #include #include main() { WORD wVersion = 0x0101; WSADATA wsaData; int err = WSAStartup(wVersion, &wsaData); cout << err << wsaData.szDescription; } ------- First, I had to edit MyWinsock.h as many variable types were used before they were defined (SOCKET, u_short). I compiled using gcc winsock.cc -lwsock32 -lstdc++ -lcygwin -lkernel32 -luser32 I received no error or warning messages, but ld produced an error in modul Kernel32. Back on the command line, I found two new files: a.out and a.out.exe (size 0). When I renamed a.out to a.exe it ran just fine: 0Microsoft Windows Sockets Version 1.1. Who can explain the fault (mine or the compiler's)? Thanks in advance, Michael Ritzert PS: Sorry if this is off-topic and there is a special newsgroup for the cygnus port. I guess I've heard of one, but at least here in Germany, I can't receive it.