Re: [boost] [filesystem] operations.hpp Won't Compile with VC10 using Boost 1.47

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@sig.com 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.

[Robert Stewart]
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!
It doesn't: C:\Temp>type meow.cpp # if defined( BOOST_NO_STD_WSTRING ) # error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support # endif int main() { } C:\Temp>cl /EHsc /nologo /W4 /MTd meow.cpp meow.cpp C:\Temp> STL

Stephan T. Lavavej wrote:
[Robert Stewart]
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!
It doesn't:
C:\Temp>type meow.cpp # if defined( BOOST_NO_STD_WSTRING ) # error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support # endif
int main() { }
C:\Temp>cl /EHsc /nologo /W4 /MTd meow.cpp meow.cpp
I tried recreating the command line our build system uses and I can't replicate the behavior, but it always prints them in my environment. Perhaps the small file affects the behavior and after digesting large amounts of code, it might fail. I even tried including boost/filesystem/operations.hpp. So far, I can't reproduce the problem. If I ever come up with a self-contained, repeatable demonstration of the problem, I'll pass it along. Since we're off topic, I'll not dwell on this further. _____ Rob Stewart robert.stewart@sig.com 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.
participants (2)
-
Stephan T. Lavavej
-
Stewart, Robert