I'm still quite new to programming. I'm trying to make a hangman game with a server and client using winsock.h, but i can't seem to make it compile. I get the following errors when trying to compile it from the cmd window, even though I already modified the compiler linker setting (in codeblocks):
C:\Users\USER\Documents\Maestria\Computacion\prueva2>gcc cliente.c -o client.exe
undefined reference to `WSAStartup@8'
undefined reference to `socket@12'
undefined reference to `htons@4'
undefined reference to `inet_addr@4'
undefined reference to `connect@12'
undefined reference to `closesocket@4'
undefined reference to `send@16'
undefined reference to `recv@16'
undefined reference to `closesocket@4'
undefined reference to `WSACleanup@0'
collect2.exe: error: ld returned 1 exit status
Does anybody know what might be the issue?