boost asio中 error C1189: #error : WinSock.h has already been included 的问题

http://blog.163.com/tsing_best/blog/static/111153022011111251020176/

 

现象

在这样的情况下,
#include <Windows.h>
#include <boost/asio.hpp>
编译器会报错,fatal error C1189:   #error :  WinSock.h has already been included

解决办法
#define WIN32_LEAN_AND_MEAN      // 在#include<windows.h>前定义
#include <windows.h>

你可能感兴趣的:(boost asio中 error C1189: #error : WinSock.h has already been included 的问题)