delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/09/18/09:34:34

From: csthomas AT egsoftware DOT com (Cameron S. Thomas)
Subject: Winsock problem
18 Sep 1997 09:34:34 -0700 :
Message-ID: <3421557A.F3812145.cygnus.gnu-win32@egsoftware.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

I'm having a problem with the Winsock stuff in g++ -- perhaps someone could
tell me what I'm doing wrong.

The following code snipet compiles/links fine as a 'C' file, but not as a
'CPP' or 'CC' file :

==

#define         Win32_Winsock		// emulate Winsock 1.1
#include        <windows.h>
#include        <stdio.h>

main()
{
        SOCKET  sfh;
        printf ("cygnus rules!\n");
        exit (0);
}

bash> gcc -o test.exe test.c		; works fine, but

bash> gcc -o test.exe test.cpp		; fails miserably


== 

What's the diff? Obviously there's something amiss with the c++ includes, or
just my setup, eh?

--
Cameron S. Thomas
csthomas AT egsoftware DOT com
e.g. Software, Inc.
Tel: (503) 294-7025 x233
Fax: (503) 294-7130
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019