Boost logo

Boost :

Subject: Re: [boost] [filesystem] operations.hpp Won't Compile with VC10 using Boost 1.47
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2012-02-14 13:49:58


Stephan T. Lavavej wrote:
> [Robert Stewart]
> > When I try to include boost/filesystem/operations.hpp, my
> > code won't compile on MSVC 10 (Visual Studio 2010).
> > The error is from boost/filesystem/v3/config.hpp:49:
> > # if defined( BOOST_NO_STD_WSTRING )
> > # error Configuration not supported: Boost.Filesystem V3
> and later requires std::wstring support
> > # endif
>
> First, check your command line. If it isn't defining the
> macro, preprocess with /P /d1PP . The second option is
> undocumented and unsupported, but extremely useful - it
> preserves #define directives, so you can see where macros are
> coming from.

I was looking for such an option!

BOOST_NO_STD_WSTRING didn't appear in the output. This was a false alarm. Why does VC print #error messages that are conditionally compiled and don't apply!

In this case, BOOST_NO_STD_WSTRING is *not* defined, yet the #error still appears in the output:

In file included from D:/.../Boost/boost_1_47/include/boost-1_47/boost/filesystem/operations.hpp:31,
                 from controller.cpp:22:
D:/.../Boost/boost_1_47/include/boost-1_47/boost/filesystem/v3/operations.hpp:21:5: #error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support

Emacs' compilation-mode dutifully marks that as an error and I didn't realize that the build progressed past that point. Arrrggghhh!

Thanks for your help.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP http://www.sig.com

________________________________

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk