I am writing my program in Visual Studio 2010.
I am unable to link a file named ws2_32.dll
with my project.
Can anyone tell me how I can do that?
Typically you dont link to ws2_32.dll directly but to WS2_32.Lib, which you can find in the Windows SDK. So in your code you write
#include <winsock2.h>
and to your linker-settings you add WS2_32.Lib and you're good to go.
The Windows SDK is here: