Boost logo

Boost :

From: David Whetstone (mr.fixit_at_[hidden])
Date: 2006-01-12 21:23:38


When trying to compile this (tester.cpp):

   #include <boost/filesystem/path.hpp>

   int main(int argc, char *argv[])
   {
     boost::filesystem::path path1( "some/path" );
     boost::filesystem::path path2;
     path2.append( path1.begin(), path1.end() );
   }

like this:

> g++ -o tester tester.cpp -L/usr/local/lib -lboost_filesystem-d-1_34

         -I/usr/local/include/boost-1_34

with this:

> g++ --version
   i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build
   5247)
   Copyright (C) 2005 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions. There
   is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.

or this:

> g++ --version
   powerpc-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.
   build 5247)
   Copyright (C) 2005 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions. There
   is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
   PARTICULAR PURPOSE.

I get this:

/usr/local/include/boost-1_34/boost/filesystem/path.hpp: In member
function 'boost::filesystem::basic_path<String, Traits>&
boost::filesystem::basic_path<String, Traits>::append(InputIterator,
InputIterator) [with InputIterator =
boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, String = std::string, Traits
= boost::filesystem::path_traits]':
tester.cpp:7: instantiated from here
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1002: error: no
matching function for call to 'is_separator(const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
tester.cpp:7: instantiated from here
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1002: error: no
matching function for call to 'is_separator(const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
tester.cpp:7: instantiated from here
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1002: error: no
match for 'operator==' in
'((boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&, ptrdiff_t>*)(&
boost::operator+(const boost::iterator_facade<Derived1, V1, TC1, R1,
D1>&, typename Derived::difference_type) [with Derived =
boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, V = const std::string, TC =
boost::bidirectional_traversal_tag, R = const std::string&, D =
ptrdiff_t](2)))->boost::iterator_facade<I, V, TC, R, D>::operator* [with
Derived = boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, Value = const std::string,
CategoryOrTraversal = boost::bidirectional_traversal_tag, Reference =
const std::string&, Difference = ptrdiff_t]() ==
boost::filesystem::colon<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits> >::value'
tester.cpp:7: instantiated from here
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1007: error: no
matching function for call to 'is_separator(const
std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)'
tester.cpp:7: instantiated from here
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1011: error: no
match for 'operator&&' in 'boost::operator!= [with Derived1 =
boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, V1 = const std::string, TC1 =
boost::bidirectional_traversal_tag, R1 = const std::string&, D1 =
ptrdiff_t, Derived2 = boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, V2 = const std::string, TC2 =
boost::bidirectional_traversal_tag, R2 = const std::string&, D2 =
ptrdiff_t](((const
boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&,
ptrdiff_t>&)((const
boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&,
ptrdiff_t>*)((boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&, ptrdiff_t>*)(&
first)))), ((const
boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&,
ptrdiff_t>&)((const
boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&,
ptrdiff_t>*)((boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&, ptrdiff_t>*)(&
last))))) &&
((boost::iterator_facade<boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, const std::string,
boost::bidirectional_traversal_tag, const std::string&, ptrdiff_t>*)(&
first))->boost::iterator_facade<I, V, TC, R, D>::operator* [with Derived
= boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, Value = const std::string,
CategoryOrTraversal = boost::bidirectional_traversal_tag, Reference =
const std::string&, Difference = ptrdiff_t]()'
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1011: note:
candidates are: operator&&(bool, bool) <built-in>
tester.cpp:7: instantiated from here
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1011: error: no
matching function for call to
'boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::m_append(const std::basic_string<char,
std::char_traits<char>, std::allocator<char> >&)'
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:959: note:
candidates are: void boost::filesystem::basic_path<String,
Traits>::m_append(typename String::value_type) [with String =
std::string, Traits = boost::filesystem::path_traits]
/usr/local/include/boost-1_34/boost/iterator/iterator_facade.hpp: In
static member function 'static void
boost::iterator_core_access::advance(Facade&, typename
Facade::difference_type) [with Facade =
boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator]':
/usr/local/include/boost-1_34/boost/iterator/iterator_facade.hpp:695:
instantiated from 'Derived& boost::iterator_facade<I, V, TC, R,
D>::operator+=(Difference) [with Derived =
boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, Value = const std::string,
CategoryOrTraversal = boost::bidirectional_traversal_tag, Reference =
const std::string&, Difference = ptrdiff_t]'
/usr/local/include/boost-1_34/boost/filesystem/path.hpp:1004:
instantiated from 'boost::filesystem::basic_path<String, Traits>&
boost::filesystem::basic_path<String, Traits>::append(InputIterator,
InputIterator) [with InputIterator =
boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator, String = std::string, Traits
= boost::filesystem::path_traits]'
tester.cpp:7: instantiated from here
/usr/local/include/boost-1_34/boost/iterator/iterator_facade.hpp:547:
error: 'class boost::filesystem::basic_path<std::string,
boost::filesystem::path_traits>::iterator' has no member named 'advance'

I get similar errors when building with g++ 3.3. Any ideas?


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