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.
posted @ 2010-10-08 05:26  史莱姆  阅读(257)  评论(0编辑  收藏  举报