This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Bug winsock?
- To: gcc at gcc dot gnu dot org
- Subject: Bug winsock?
- From: Pietro <kpietro at inwind dot it>
- Date: Sun, 28 Jan 2001 16:00:08 +0100
Hello,
I have gcc-2.95.2 for windows95 (mingw32).
The problem is :
undefined reference to ' WSAStartupç8 '.
There is winsock.h.
Why ?
The program is:
#include <winsock.h>
#include <stdio.h>
void start_winsock();
main()
{
start_winsock();
}
void start_winsock()
{ WSADATA wsaData;
WORD wVersionRequested;
wVersionRequested = MAKEWORD (1, 1);
if ( WSAStartup( wVersionRequested, &wsaData ) < 0)
fatal_error("Non va");
}
The command is : gcc sock.c (name my program)
Whit gcc -H sock.c appaire ..\..\include\winsock.h
Is ok.
Help me
Thanks
Ciao by Italy