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.
Hi : Thanks for the note.
fs::path( "c:\\", fs::native ) works.
c:\\temp works
c:\\temp\\test.xml fails ( should this fail or work? )
I'm deeper in my exploration now ...
Here's a question for you. If I use a proxy class like the attached
this all fails. Is there something "special" about fs::path that
dictates I can't proxy it? If I compile that TuPath into a dll it
fails but if it's attached to a standalone it works fine. So is there
something special about fs::path?
Clearly the proxy started as a "is-a" relationship and now I'm trying
it as a "has-a" but to no avail.
I'm getting closer .. something to do with the external linkage or rtl
but the rtls are all consistent which is what's confusing me even
more.
Thanks;
Steve a.
On Apr 5, 2005 10:00 AM, John.Wismar@autozone.com
steve ahlgren
wrote: fs::path p = fs::path( "c:/", fs::native );
What happens when you use this?
fs::path p = fs::path( "c:\\", fs::native );
-------------------------------- John Wismar john.wismar@autozone.com
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
original message: 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. c/dir/file.ext works for me vc++7.1 on xp Jan
participants (3)
-
Jan
-
John.Wismar@autozone.com
-
steve ahlgren