- status: open --> open-accepted
library version: stlsoft-dev_1.9.85-1
compiler details: g++ (Debian 4.3.2-1.1) 4.3.2
under debian lenny, the following fails to compile:
#include <string>
#include <unixstl/filesystem/glob_sequence.hpp>
int main() {
const std::string foo("bar");
stlsoft::unixstl_project::glob_sequence
dir(foo, "file*", stlsoft::unixstl_project::glob_sequence::files);
return 0;
}
error message indicates that the access shim cannot be found:
/usr/include/unixstl/filesystem/glob_sequence.hpp: In constructor ‘stlsoft::unixstl_project::glob_sequence::glob_sequence(const S1&, const S2&, stlsoft::unixstl_project::glob_sequence::search_flags) [with S1 = std::string, S2 = char [6]]’:
testdriver.cpp:10: instantiated from here
/usr/include/unixstl/filesystem/glob_sequence.hpp:418: error: no matching function for call to ‘c_str_ptr(const std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)’
/usr/include/stlsoft/shims/access/string/std/c_string.h:427: note: candidates are: const stlsoft::ss_char_a_t* stlsoft::c_str_ptr(const stlsoft::ss_char_a_t*)
/usr/include/stlsoft/shims/access/string/std/c_string.h:454: note: const stlsoft::ss_char_w_t* stlsoft::c_str_ptr(const stlsoft::ss_char_w_t*)
/usr/include/unixstl/shims/access/string/dirent.hpp:271: note: const stlsoft::unixstl_project::us_char_a_t* stlsoft::unixstl_project::c_str_ptr(const dirent&)
/usr/include/unixstl/shims/access/string/dirent.hpp:244: note: const stlsoft::unixstl_project::us_char_a_t* stlsoft::unixstl_project::c_str_ptr(const dirent*)
I can compile by adding #include <stlsoft/shims/access/string.hpp> before #include <unixstl/filesystem/glob_sequence.hpp>, Changing the order of #includes does not work.
readdir_sequence has a similar problem, I can provide a sample if needed.
cheers, Rupert