Boost logo

Boost Users :

From: steve ahlgren (steveahlgren_at_[hidden])
Date: 2005-04-05 10:44:58


Hello all :

I'm having great difficulty with boost::filesystem::path (again) and
wondering if anyone else has seen this behavior. I'm using vc7.1
(msvc 2003) testing with both static and dynamic link
boost::filesystem libraries.

The behavior is as follows :
1. The boost regression tests all pass ( ie, in BOOST_ROOT/status
running "bjam --dump-tests" and sorting through the output ).

2. If I use fs::path in my code with an absolute windows path ( ie
c:/temp ) it _always_ throws. As an example, when I include the
following code from the fs test file path_test.cpp in my own code it
fails :

                fs::path p = fs::path( "c:/", fs::native );
                assert( p.relative_path().string() == "" );
                assert( p.branch_path().string() == "c:" );
                assert( p.leaf() == "/" );
                assert( p.root_name() == "c:" );
                assert( p.root_directory() == "/" );
                assert( p.root_path().string() == "c:/" );
                assert( p.has_root_path() );
                assert( p.has_root_name() );
                assert( p.has_root_directory() );
                assert( !p.has_relative_path() );
                assert( p.has_leaf() );
                assert( p.has_branch_path() );
                assert( p.is_complete() );

3. The exceptions are being chucked by the checker code; if I use
boost::filesystem::no_check it doesn't fail. The checker complains
that "c:" is invalid but clearly it's not !

4. Before anyone mentions it, the rtls are consistent across all
libraries including boost. Perhaps that's the problem though? Do
people use boost successfully with /MD and /MDd?

Has anyone else seen similar behavior or have any suggestions about
what may be happening? As a long shot is this something to do with
wchar_t settings on msvc ( /Zc:wchar_t )??

If it's not too much trouble (and I'm assuming it doesn't break the
license ) can someone send me the debug build of boost::fs lib (either
static or import/dll)? I'll happily pay you back in good kharma!

Many thanks in advance;
Steve a.


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