Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37AF5469.67B8D34A@unique-id.com> Date: Mon, 09 Aug 1999 23:21:30 +0100 From: Simon Gornall X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT sourceware DOT cygnus DOT com Subject: Newbie with socket problems...(pretty long) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Note-from-DJ: This may be spam I've just downloaded a clean 'full install' of the B20.1 cygnus development environment, and I seem to be having problems with sockets. It's all linking correctly, and I can't seem to find anyone else with problems recently, so I assume I'm linking it incorrectly or something... If anyone cares to have a look and see what I'm doing wrong, I'd be very grateful. I'm *almost* at the stage where I can have the same source tree across PC/Linux/Irix/Sun :-) Anyway, here's the code, ripped out of the application and wrapped with a 'main' function: extern "C" { # include }; #include // For errors etc. #include // For atoi() void die(char *msg) { cerr << "FATAL : " << msg << endl; exit(-1); } int main(int argc, char **argv) { int _debug = 1; char *_host = argv[1]; int _port = atoi(argv[2]); int _socket = -1; // ================================================================== // Connect to the server // ================================================================== struct sockaddr_in sk_addr; // use sk_addr because s_addr is #defined under cygwin. // Can't find bzero() ... for (unsigned int i=0; i search starts here: E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\include\mingw32 E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\..\include\g++ E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\..\include E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\include E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\include End of search list. E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\cc1plus.exe C:\WINDOWS\TEMP\ccTaaPFf.ii -quiet -dumpbase test.cc -mno-cygwin -version -o C:\WINDOWS\TEMP\ccu7RywY.s GNU C++ version egcs-2.91.57 19980901 (egcs-1.1 release) (i586-cygwin32) compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release). E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\bin\as.exe -o C:\WINDOWS\TEMP\ccmKtYoW.o C:\WINDOWS\TEMP\ccu7RywY.s E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\collect2.exe -o t.exe E:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib\crt1.o -LE:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57 -LE:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib -LE:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\..\..\i586-cygwin32\lib -LE:\GNU\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\..\..\.. C:\WINDOWS\TEMP\ccmKtYoW.o -lwsock32 -lstdc++ -lm -lgcc -lmingw32 -lmoldname -lcrtdll -lkernel32 -ladvapi32 -lshell32 -lgcc -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com