Boost logo

Boost Users :

From: Anders Sundman (sundman.anders_at_[hidden])
Date: 2007-08-03 06:48:46


I have the same problem and any suggestions on how to solve this would
be much appreciated.

Currently I'm wrapping all boost includes that cause the problem this like:

#pragma warning(push)
#pragma warning(disable: 4005)
#include <boost/spirit.hpp>
#include <boost/spirit/phoenix.hpp>
#pragma warning(pop)

But it's not pretty.

// Anders S

On 8/3/07, KSpam <keesling_spam_at_[hidden]> wrote:
> My projects need to define WIN32_LEAN_AND_MEAN. Unfortunately, they receive
> many compilation warnings due to macro redefinition in the following Boost
> headers (1.34.1).
>
> boost/iostreams/detail/system_failure.hpp
> boost/spirit/iterator/impl/file_iterator.ipp
>
> I understand that I can avoid the need to define WIN32_LEAN_AND_MEAN by
> ensuring that Boost headers are always included prior to <windows.h>. I do
> not like the idea of include order dependencies, as I am certain that I will
> come back to bite me down the road.
>
> Another option would be to turn the particular warning off; however, I would
> rather not do this.
>
> Would it be prudent to patch the Boost headers to only define
> WIN32_LEAN_AND_MEAN if it is not already defined? If not, is there another
> solution that I am overlooking.
>
> Thanks,
> Justin
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


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