tokenizer compilation problem with gcc 3.0.3 and stlport

Hi all, I have been having trouble getting the tokenizer examples to compile using gcc 3.0.3 and stlport. I am using the example code from http://www.boost.org/libs/tokenizer/escaped_list_separator.htm, with the following compiler output: test.cpp: In instantiation of `::boost::::boost::iterator_ada ptor<::boost::detail::::boost::detail::token_iterator_base<co nst char *>,::boost::detail::::boost::detail::tokenizer_polic y<::_STL::::_STL::basic_string<char,::_STL::::_STL::char_trai ts<char>,::_STL::::_STL::allocator<char> >,::boost::::boost:: escaped_list_separator<char,::_STL::::_STL::char_traits<char>
,::_STL::::_STL::basic_string<char,::_STL::::_STL::char_t raits<char>,::_STL::::_STL::allocator<char> >,const ::_STL::: :_STL::basic_string<char,::_STL::::_STL::char_traits<char>,:: _STL::::_STL::allocator<char> > &,const ::_STL::::_STL::basic _string<char,::_STL::::_STL::char_traits<char>,::_STL::::_STL ::allocator<char> > *,::_STL::forward_iterator_tag,int>': test.cpp:11: instantiated from here test.cpp:11: `sizeof' applied to incomplete type `::boost:::: boost::STATIC_ASSERTION_FAILURE<false>'
If anyone has encountered and solved this problem before, I would greatly appreciate knowing what I'm doing wrong. Thanks, Chris. P.S. I get similar results with all the tokenizer examples.

I don't have gcc 3.0.3, but I tried reproducing the problem with 3.0.2, but that compiled with no problem (I assume it is the simple_example_2.cpp file that you are having trouble with). BTW, from the error msg below, it looks like the problem has to do with the iterator_category type of std::basic_string, and its interaction with the iterator_adaptor on which the token_iterator is based. On Wed, 6 Feb 2002, fintaeph wrote: cpoiri> Hi all, cpoiri> cpoiri> I have been having trouble getting the tokenizer examples to compile cpoiri> using gcc 3.0.3 and stlport. I am using the example code from cpoiri> http://www.boost.org/libs/tokenizer/escaped_list_separator.htm, with cpoiri> the following compiler output: cpoiri> cpoiri> test.cpp: In instantiation of `::boost::::boost::iterator_ada cpoiri> ptor<::boost::detail::::boost::detail::token_iterator_base<co cpoiri> nst char *>,::boost::detail::::boost::detail::tokenizer_polic cpoiri> y<::_STL::::_STL::basic_string<char,::_STL::::_STL::char_trai cpoiri> ts<char>,::_STL::::_STL::allocator<char> >,::boost::::boost:: cpoiri> escaped_list_separator<char,::_STL::::_STL::char_traits<char> cpoiri> > >,::_STL::::_STL::basic_string<char,::_STL::::_STL::char_t cpoiri> raits<char>,::_STL::::_STL::allocator<char> >,const ::_STL::: cpoiri> :_STL::basic_string<char,::_STL::::_STL::char_traits<char>,:: cpoiri> _STL::::_STL::allocator<char> > &,const ::_STL::::_STL::basic cpoiri> _string<char,::_STL::::_STL::char_traits<char>,::_STL::::_STL cpoiri> ::allocator<char> > *,::_STL::forward_iterator_tag,int>': cpoiri> test.cpp:11: instantiated from here cpoiri> test.cpp:11: `sizeof' applied to incomplete type `::boost:::: cpoiri> boost::STATIC_ASSERTION_FAILURE<false>' cpoiri> cpoiri> If anyone has encountered and solved this problem before, I would cpoiri> greatly appreciate knowing what I'm doing wrong. cpoiri> cpoiri> Thanks, cpoiri> Chris. cpoiri> cpoiri> P.S. I get similar results with all the tokenizer examples. cpoiri> cpoiri> cpoiri> cpoiri> cpoiri> cpoiri> cpoiri> cpoiri> Info: <http://www.boost.org> cpoiri> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> cpoiri> Unsubscribe: <mailto:boost-users-unsubscribe@yahoogroups.com> cpoiri> cpoiri> cpoiri> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ cpoiri> cpoiri> ---------------------------------------------------------------------- Jeremy Siek http://php.indiana.edu/~jsiek/ Ph.D. Student, Indiana Univ. B'ton email: jsiek@osl.iu.edu C++ Booster (http://www.boost.org) office phone: (812) 855-3608 ----------------------------------------------------------------------

I don't have gcc 3.0.3, but I tried reproducing the problem with 3.0.2, but that compiled with no problem (I assume it is the simple_example_2.cpp file that you are having trouble with).
I just tried all the examples with gcc3.0.3 on Linux, boost_1_26_0 -- no problems. Maybe it is an interaction with stlport.... Jeff

Hi all,
I have been having trouble getting the tokenizer examples to compile using gcc 3.0.3 and stlport. I am using the example code from http://www.boost.org/libs/tokenizer/escaped_list_separator.htm, with
Thanks to those who took the time to have a look at this problem for me. I think I made some mistakes installing gcc 3 over gcc 2.95, and corrupted the headers. I set up a clean linux install with gcc 2.95 and everything worked perfectly. Thanks again, Chris.
participants (3)
-
fintaeph
-
Jeff Garland
-
Jeremy Siek