Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio]Winsock.h
From: Darren Garvey (darren.garvey_at_[hidden])
Date: 2009-07-07 09:40:19


Hi Robert,

2009/7/7 Robert Jones <robertgbjones_at_[hidden]>

> On Tue, Jul 7, 2009 at 11:42 AM, Igor R <boost.lists_at_[hidden]> 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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net