The errors im getting in the console area
undefined reference to `__imp_socket'
undefined reference to `__imp_htons'
undefined reference to `__imp_inet_addr'
undefined reference to `__imp_connect'
The top of my source file is
#include <stdio.h>
#include <WinSock2.h>
#include <Windows.h>
#include <stdlib.h>
#include <time.h>
#pragma comment(lib,"ws2_32.lib")
Im using gcc to compile this on windows to an exe file.