Boost logo

Boost :

From: Yarias (yarias.nialo_at_[hidden])
Date: 2008-06-05 23:58:55


In case it helps track down the source of this, I get the same error.

test.c:
---------------
#include <iostream>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/convenience.hpp>

namespace fs = boost::filesystem;
int main()
{
  fs::wpath mypath(L"/tmp/some/directory");
  fs::create_directories(mypath);
}

---------------

program output:
---------------
terminate called after throwing an instance of
'boost::filesystem::basic_filesystem_error<boost::filesystem::basic_path<std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >,
boost::filesystem::wpath_traits> >'
  what(): boost::filesystem::wpath::to_external conversion error
Aborted

---------------

gdb backtrace:
---------------
(gdb) backtrace
#0 0xb7fd7410 in __kernel_vsyscall ()
#1 0xb7d6c085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7d6da01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7f7c480 in __gnu_cxx::__verbose_terminate_handler () from
/usr/lib/libstdc++.so.6
#4 0xb7f79d05 in ?? () from /usr/lib/libstdc++.so.6
#5 0xb7f79d42 in std::terminate () from /usr/lib/libstdc++.so.6
#6 0xb7f79e6a in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0xb7fbc15e in boost::filesystem::wpath_traits::to_external ()
   from /usr/lib/libboost_filesystem-gcc42-1_34_1.so.1.34.1
#8 0x0804abe7 in boost::filesystem::basic_path<std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >,
boost::filesystem::wpath_traits>::external_file_string (this=0xbfdffb9c)
    at /usr/include/boost/filesystem/path.hpp:302
#9 0x0804b35d in
boost::filesystem::exists<boost::filesystem::basic_path<std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >,
boost::filesystem::wpath_traits> > (ph=@0xbfdffb9c)
    at /usr/include/boost/filesystem/operations.hpp:279
#10 0x0804b49d in boost::filesystem::exists (ph=@0xbfdffb9c)
    at /usr/include/boost/filesystem/operations.hpp:601
#11 0x0804ba1d in
boost::filesystem::create_directories<boost::filesystem::basic_path<std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >,
boost::filesystem::wpath_traits> > (
    ph=@0xbfdffb9c) at /usr/include/boost/filesystem/convenience.hpp:42
#12 0x0804bbb9 in boost::filesystem::create_directories (ph=@0xbfdffb9c)
    at /usr/include/boost/filesystem/convenience.hpp:88
#13 0x0804a3e0 in main () at test.c:9

---------------

GCC 4.2.3
Ubuntu 8.10 (Hardy Heron)
en_US.UTF-8 Locale
Boost 1.34.1

--Yarias

-- 
View this message in context: http://www.nabble.com/-filesystem--Problems-with-wpath-on-Linux-tp15086495p17684148.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk