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 17:34:20


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.

Also beware of its sibling BOOST_ASIO_NO_NOMINMAX, which inhibits the
definition of NOMINMAX.

http://www.boost.org/doc/libs/1_49_0/doc/html/boost_asio/using.html#boost_asio.using.macros

-- 
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