|
Boost : |
Subject: Re: [boost] Boost on MSVC without Microsoft Extensions
From: Bo Persson (bop_at_[hidden])
Date: 2009-09-17 16:22:41
Craig Henderson wrote:
> I am trying to build a client program using Boost on MSVC8 with the
> "Disable Language Extensions" /Za compilation flag.
>
>
>
> visual.hpp contains the following code
>
> // disable Win32 API's if compiler extentions are
>
> // turned off:
>
> //
>
> #ifndef _MSC_EXTENSIONS
>
> # define BOOST_DISABLE_WIN32
>
> #endif
>
>
>
> win32.hpp contains:
>
> #ifndef BOOST_DISABLE_WIN32
>
> // WEK: Added
>
> #define BOOST_HAS_FTIME
>
> #define BOOST_WINDOWS 1
>
> #endif
>
>
>
> So, the preprocessor defines BOOST_DISABLE_WIN32 and doesn't define
> BOOST_WINDOWS. This doesn't sound right, and causes problems with
> Boost.ASIO where the Windows header files are conditionally
> included using
>
> #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
>
> which clearly evaluates FALSE.
>
>
>
> I consider this a bug in the boost config compiler detection rather
> than the asio library. Has anyone compiled with /ZA on MSVC?
>
The problem is that the Windows headers depend on the language
extensions. With /Za, some of them will not compile.
Bo Persson
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk