[filesystem] About use on Windows
Hi everyone, We've been using Boost since around '98 and have had a great deal of mileage out of the smart pointer libraries (thanks!) and are now starting to try out some of the other libraries. We ran into two problems with the filesystem library, the first we're starting with. 1) The initial problem was that we had always been compiling with the __fastcall convention, but the Boost libraries are built using __cdecl. In the end we switched to __cdecl, but should there not be a #define with the build declaration in the headers? 2) The path class only uses narrow strings. For use with the standard C++ libraries this seems fine, but I think once the new standard goes through there should be wide character variants for the file library. In any case we often use bits of the Win32 API which do take wide characters. I'm just wondering if we should just copy the path class to make a wpath class path and if we do so should we give that copy back to integrate with the normal Boost library? This second is probably of more relevance to us now that we've changed our build options. Kirit
On 4/21/07, Kirit Sælensminde
2) The path class only uses narrow strings. For use with the standard C++ libraries this seems fine, but I think once the new standard goes through there should be wide character variants for the file library. In any case we often use bits of the Win32 API which do take wide characters. I'm just wondering if we should just copy the path class to make a wpath class path and if we do so should we give that copy back to integrate with the normal Boost library?
You're apparently not the only ones to need these, as in 1.34 (and the TR2 proposal) there is basic_path, with typedefs for path and wpath : http://www.boost-consulting.org/boost/libs/filesystem/doc/tr2_proposal.html#... The release manager is starting packaging a beta of 1.34 on Monday, so it should only be a few weeks until release. ~ Scott McMurray
me22 wrote:
On 4/21/07, Kirit Sælensminde
wrote: 2) The path class only uses narrow strings. For use with the standard C++ libraries this seems fine, but I think once the new standard goes through there should be wide character variants for the file library. In any case we often use bits of the Win32 API which do take wide characters. I'm just wondering if we should just copy the path class to make a wpath class path and if we do so should we give that copy back to integrate with the normal Boost library?
You're apparently not the only ones to need these, as in 1.34 (and the TR2 proposal) there is basic_path, with typedefs for path and wpath : http://www.boost-consulting.org/boost/libs/filesystem/doc/tr2_proposal.html#...
The release manager is starting packaging a beta of 1.34 on Monday, so it should only be a few weeks until release.
Thanks Scott. In that case we'll hold off introducing it until 1.34 comes out. K
Kirit Sælensminde wrote:
Hi everyone,
[...]
We ran into two problems with the filesystem library, the first we're starting with.
1) The initial problem was that we had always been compiling with the __fastcall convention, but the Boost libraries are built using __cdecl. In the end we switched to __cdecl, but should there not be a #define with the build declaration in the headers?
Speaking of the coming 1.34... Boost.Filesystem has a macro BOOST_FILESYSTEM_DECL, which should be what you are looking for.
2) The path class only uses narrow strings. For use with the standard C++ libraries this seems fine, but I think once the new standard goes through there should be wide character variants for the file library. In any case we often use bits of the Win32 API which do take wide characters. I'm just wondering if we should just copy the path class to make a wpath class path and if we do so should we give that copy back to integrate with the normal Boost library?
The Boost.Filesystem 1.34 supports both narrow an wide string.
Kirit Sælensminde wrote:
Hi everyone,
[...]
We ran into two problems with the filesystem library, the first we're starting with.
1) The initial problem was that we had always been compiling with the __fastcall convention, but the Boost libraries are built using __cdecl. In the end we switched to __cdecl, but should there not be a #define with the build declaration in the headers?
Speaking of the coming boost version 1.34... Boost.Filesystem has a macro BOOST_FILESYSTEM_DECL, which should be what you are looking for.
2) The path class only uses narrow strings. For use with the standard C++ libraries this seems fine, but I think once the new standard goes through there should be wide character variants for the file library. In any case we often use bits of the Win32 API which do take wide characters. I'm just wondering if we should just copy the path class to make a wpath class path and if we do so should we give that copy back to integrate with the normal Boost library?
The Boost.Filesystem in 1.34 supports both wide and narrow string. And I saw there are lots of improvement.
participants (3)
-
gchen
-
Kirit Sælensminde
-
me22