Feb 19, 2010 at 6:23pm UTC
Continues error, but i tryied to solve it.
ends like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#include <iostream>
#include <winsock2.h>
#include <windows.h>
WSADATA wsaData;
WORD version = MAKEWORD( 2, 0 );
int error = WSAStartup( version, &wsaData );
/* check for error */
if (error != 0)
{
/* error occured */
return FALSE;
}
/* check for correct version */
if ( LOBYTE( wsaData.wVersion ) != 2 ||
HIBYTE( wsaData.wVersion ) != 0 )
{
/* incorrect WinSock version */
WSACleanup();
return FALSE;
}
/* WinSock has been initialized */
BUT Sends this:
[Linker Error] undefined reference to `WinMain@16'
[Build Errror] Error 1
Plz help....
Last edited on Feb 19, 2010 at 7:12pm UTC
Feb 19, 2010 at 8:01pm UTC
I searrched in other forums, and i didnt find any type of help... ur my last chance in sockets.
Feb 20, 2010 at 3:49am UTC
I'm not sure, I'm just starting with sockets, but it might be that u need to use a different header file.
There are some small details as to when you use winsock2.h and when u use something else.
hope that helps
Feb 20, 2010 at 11:49am UTC
where does your program start?...