Try boost::filesystem::path(“C:\\”, boost::filesystem::native);

 

You can also take a look at the examples under <boost/libs/filesystem/example>

 

Hope this helps,

 

-delfin

 


From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Mesut Büyüktokatli
Sent: Sunday, July 24, 2005 7:19 AM
To: boost-users@lists.boost.org
Subject: [Boost-users] problem using boost::filesystem

 

Hello...
I am triing to use the boost::filesystem library. But actually i am stucked
using it. I have WindowsXP without a service pack. I am using
Visual Studio 6.0 installed in default folders for VS6. I am using stlport
but without the iostreams. After uncompressing boost, i compiled
boost with bjam with following statement:

bjam "-sTOOLS=msvc-stlport" "-sSTLPORT_VERSION=4.6" "-sSTLPORT_PATH=..\stlport" "-sBUILD=debug <stlport-iostream>off" stage

Compilation has no errors and all libs are build. Now i want to use boost::filesystem::path, example:

If i use following code:

boost::filesystem::path( "C:\\" );

System makes an kernal32 exception and crashs.