« Return to Thread: [asio]Winsock.h

Re: [asio]Winsock.h

by Darren Garvey-3 :: Rate this Message:

Reply to Author | View in Thread

Hi Robert,

2009/7/7 Robert Jones <robertgbjones@...>
On Tue, Jul 7, 2009 at 11:42 AM, Igor R <boost.lists@...> wrote:
> What's the deal with Winsock.h & Asio?

Boost 1.38, Vis Studio 2005, and the issue is that unless I put the main
Boost.Asio header first in my #include list I get a failure message

WinSock.h has already been included

from socket_types.hpp.

The workaround for this is to #define WIN32_LEAN_AND_MEAN before including the windows header. The problem is really that windows.h includes so much stuff in it.

It looks like Boost.Asio defines WIN32_LEAN_AND_MEAN by default anyway (http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/using.html).

Cheers,
Darren



_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

 « Return to Thread: [asio]Winsock.h