winsock.lib wsock32.lib ws2_32.libIn my experience ws2_32.lib seems to be work on the largest number of machines... from different versions of Windows, etc. And to include winsock2, put this in your stdafx.h:
// Lean and mean avoids winsock.h which conflicts with winsock2 #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winsock2.h>