WinSock2.h Redfinition problem

Try including "winsock2.h" before "windows.h" in your source code. There's an include guard in "winsock2.h" that prevents "winsock.h" from being pulled in.

 

By default, "windows.h" trys to pull in "winsock.h", so if it appears in your file first, you'll end up including both "winsock.h" and "winsock2.h", resulting in the re-definition errors.

你可能感兴趣的:(init)