i'm new to network programming and i am trying out a tutorial on . here's the program i tried.
#include<winsock2.h>
#include<ws2tcpip.h>
#include<iphlpapi.h>
#include <iostream>
using namespace std;
int main()
{
WSADATA wsaData;
int iResult;
//initialize winsock
iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if(iResult!=0)
{
cout << "Startup Failed:"<<iResult<< endl;
}
return 1;
}
the error i got is:
D:\CodeBlocks\MinGW\bin\Network\main.cpp|14|undefined reference to `WSAStartup@8'|
again, this is my first time doing network programming
and i donno why this error is coming. I think i should install windows sdk. someone do tell me if i should and what i should install.