Also, make sure WinSock2.h is included beforehand where it's needed.
Just open the MSVC project file and build.