Boost logo

Boost Users :

Subject: Re: [Boost-users] 1.49 header order conflicts on Windows
From: Lars Viklund (zao_at_[hidden])
Date: 2012-06-13 18:14:37


On Wed, Jun 13, 2012 at 11:34:20PM +0200, Lars Viklund wrote:
> On Wed, Jun 13, 2012 at 07:03:01PM +0000, Davidson, Josh wrote:
> > Consider this following simple app:
> >
> > #include <boost/thread/thread.hpp>
> > #include <boost/asio.hpp>
> > #include <boost/thread/recursive_mutex.hpp>
> >
> > If asio.hpp is moved ahead of the thread headers, the error goes away. We've been trying to dictate #include order to work around this problem, but it keeps cropping up.
>
> Asio is "friendly" enough to define WIN32_LEAN_AND_MEAN for you, which
> pretty much breaks any other consumer of Windows.h.
>
> Consider setting BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN project-wide and
> whine at whoever made this deranged behaviour the default.

Disregard the above, I misunderstood your "ahead" there.

Which mingw is this exactly?
There's a lot of them out there; original mingw, mingw-w64
personals/automatic, DGN, TDM, etc.

There might be some header providing the intrinsics that gets
automatically included with MSVC but not Mingw, which Asio happens to
pull in through some other header.

-- 
Lars Viklund | zao_at_[hidden]

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