Prova a fare così:

Vai su Option->Compiler Option

spunta la casella "Add the following command when calling compiler"
e inserisci nella textbox la seguente stringa: -lwsock32

Applica le modifiche e prova a ricompilare.
A me dava un problema del genere e ho risolto così.

Facci sapere

Max