
My last guess would be static vs. dynamic runtime libraries...
I just tried statically linked single-threaded builds and...they work. I thought I had done this already, but I guess I hadn't. (also, I just checked, and so does the multi-threaded static build). Oh man. Warms thanks for your assistance (also to Volodya also). For the sake of completeness, and because I had it all written any way, here's my response to the rest of your email.
I'm using Code::Blocks under XP, with Boost 1.37 with Mingw 3.4.5 (linking to boost_system-mgw34-mt-1_37.lib and boost_filesystem-mgw34-mt-1_37.lib )
Also in debug mode ? I've tried linking to a variety of different libraries in a variety of different build modes.
and it does work. Please find a sample project using bjam and Boost.Test attached. It would be great if you could test this with your setup. I've looked at the regression test but no-one seems to be running mingw-3.4.x tests continuously (some stalled on trunk, none on release)
It ran the test, with both (toolset=msvc and toolset=gcc), and both passed.
That's is the constructor throwing an exception when setting up with an invalid path. Try to catch it. Tried catching it with
catch ( std::runtime_error ex ) and catch ( boost::filesystem::filesystem_error ex ) but neither catch anything. create_directory() and exists() work fine, but remove_all() seems to throw a similar error.
Using fs::path p("bla"); your example throws:
unknown location(0): fatal error in "filesystem": std::runtime_error: boost::filesystem::basic_directory_iterator constructor: The system cannot find the path specified: "bla" unknown location(0): fatal error in "filesystem": std::runtime_error: boost::filesystem::basic_directory_iterator constructor: The system cannot find the path specified: "bla"
at least with mingw-4.3.2 I can get it to throw this error the release build as well.