Boost logo

Boost :

From: eozcan_at_[hidden]
Date: 2001-01-11 19:48:51


Hi,

  I am trying to compile regex/demo/snippets/snippet4.cpp example but
there are errors. Firstly, I tried

# g++ -o s4 -O2 -I../../../../ snip4.cpp -L../../lib/gcc -lregex++
snip4.cpp:26: sstream: No such file or directory

I found a sstream.tgz file searching at this mailling list and
installed it into /usr/include/g++-2 dir. Then I tried

#g++ -o s4 -O2 -I../../../../ snip4.cpp -L../../lib/gcc -lregex++
-I/usr/include/g++-2
this time i got following errors

In file included from /usr/include/g++-2/iostream.h:31,
                 from /usr/include/g++-2/iostream:6,
                 from snip4.cpp:24:
/usr/include/g++-2/streambuf.h: In method `ios::~ios()':
/usr/include/g++-2/streambuf.h:485: warning: `void *' is not a
pointer-to-object type
snip4.cpp: In function `int main(int, const char **)':
snip4.cpp:68: parse error before `+'
snip4.cpp:69: request for member `c_str' in `out_name', which is of
non-aggregate type `string ()(...)'
snip4.cpp:74: wrong number of template arguments (2, should be 1)
/usr/include/g++-2/stl_iterator.h:804: provided for `template <class
T> ostream_iterator<T>'
snip4.cpp:74: confused by earlier errors, bailing out

  So i removed the sstream files and tried to use stlport

#g++ -o s4 -O2 -I../../../../ snip4.cpp -L../../lib/gcc -lregex++
-L/home/erol/tmp/STLport-4.0/lib -lstlport_gcc
-I/home/erol/tmp/STLport-4.0/stlport

i got very long message
/tmp/ccz9wxqU.o: In function `boost::reg_expression<char,
boost::regex_traits<char>,
boost::re_detail::jm_def_alloc>::compile_set_aux(boost::re_detail::jstack<_STL::basic_string<char,
_STL::char_traits<char>, _STL::allocator<char> >,
boost::re_detail::jm_def_alloc> &,
boost::re_detail::jstack<_STL::basic_string<char,
_STL::char_traits<char>, _STL::allocator<char> >,
boost::re_detail::jm_def_alloc> &, boost::re_detail::jstack<unsigned
int, boost::re_detail::jm_def_alloc> &,
boost::re_detail::jstack<_STL::basic_string<char,
_STL::char_traits<char>, _STL::allocator<char> >,
boost::re_detail::jm_def_alloc> &, bool,
boost::re_detail::_narrow_type const &)':
<snip>

  My system info is here
  OS : Linux Mandrake 7.2
  Kernel: 2.2.17-3
  g++ : 2.95.3
  
  Anyone can help me compile this?

Thanks,
Erol Ozcan


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