I was looking at a Winsock tutorial at http://world.std.com/~jimf/papers/so...l#Introduction
and I copied the example code (figure 1), but when I compile I get errors like:
c:\dev-c++\myproj\winsock\wins.o(.text+0x36):wins.cpp: undefined reference to `gethostname@8'
c:\dev-c++\myproj\winsock\wins.o(.text+0x48):wins.cpp: undefined reference to `gethostbyname@4'
c:\dev-c++\myproj\winsock\wins.o(.text+0x8a):wins.cpp: undefined reference to `htons@4'
c:\dev-c++\myproj\winsock\wins.o(.text+0xa4):wins.cpp: undefined reference to `socket@12'
c:\dev-c++\myproj\winsock\wins.o(.text+0xd7):wins.cpp: undefined reference to `bind@12'
c:\dev-c++\myproj\winsock\wins.o(.text+0xf0):wins.cpp: undefined reference to `closesocket@4'
c:\dev-c++\myproj\winsock\wins.o(.text+0x10d):wins.cpp: undefined reference to `listen@8'
C:\DEV-C_~1\LIB\\libmingw32.a(main.o)(.text+0x8e): undefined reference to `WinMain@16'
I've had errors like this before, but somehow they resolved themselves...not sure what to do...

Using Dev C++ 4