how to add the 'hash_map' and 'hash_set'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
   I'am doing some work that equires me to use the
stl's hash_map and hash_set .however ,i find no such
thing in g++'s standard library .so i download the
sgi's stl (version 3.3 ) .As instructed ,i unpack the
sgi's stl package in a new directory and using '-I'
option to direct the compiler to find the header file
'hash_map' and 'hash_set' .What infrustrated me is the
following errors i get:
Anyone who knows how to solve it??

In file included from
/usr/include/c++/3.2.2/backward/new.h:33,
                 from stl/stl_algobase.h:52,
                 from stl/memory:18,
                 from stl/string:23,
                 from BSC/Dict/JElusDictManager.h:12,
                 from BSC/Dict/JElusDictManager.cpp:1:
/usr/include/c++/3.2.2/backward/backward_warning.h:32:2:
warning: #warning This file includes at least one
deprecated or antiquated header. Please consider using
one of the 32 headers found in section 17.4.1.2 of the
C++ standard. Examples include substituting the <X>
header for the <X.h> header for C++ includes, or
<sstream> instead of the deprecated header
<strstream.h>. To disable this warning use
-Wno-deprecated.
In file included from
/usr/include/c++/3.2.2/bits/basic_ios.h:40,
                 from /usr/include/c++/3.2.2/ios:51,
                 from
/usr/include/c++/3.2.2/ostream:45,
                 from
/usr/include/c++/3.2.2/iostream:45,
                 from
/usr/include/c++/3.2.2/backward/iostream.h:32,
                 from stl/stl_algobase.h:57,
                 from stl/memory:18,
                 from stl/string:23,
                 from BSC/Dict/JElusDictManager.h:12,
                 from BSC/Dict/JElusDictManager.cpp:1:
/usr/include/c++/3.2.2/bits/streambuf_iterator.h: At
global scope:
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:48:
parse error before `<'
   token
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:54:
syntax error before `;'
   token
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55:
`_Traits' is not a class
   or namespace
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55:
`int_type' is not a class
   or namespace
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55:
using `typename' outside
   of template
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:55:
`_Traits' fails to be a
   typedef or built in type
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56:
`_CharT' was not declared
   in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56:
`_Traits' was not declared
   in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56:
template argument 1 is
   invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:56:
template argument 2 is
   invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57:
`_CharT' was not declared
   in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57:
`_Traits' was not declared
   in this scope
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57:
template argument 1 is
   invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:57:
template argument 2 is
   invalid
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:59:
parse error before `
   private'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:70:
parse error before `public
   '
/usr/include/c++/3.2.2/bits/streambuf_iterator.h: In
function `int
   std::istreambuf_iterator(istream_type&)':
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75:
`int
   std::istreambuf_iterator(istream_type&)' redeclared
as different kind of
   symbol
/usr/include/c++/3.2.2/iosfwd:95: previous declaration
of `template<class
   _CharT, class _Traits = std::char_traits<_CharT> >
class
   std::istreambuf_iterator'
/usr/include/c++/3.2.2/iosfwd:95: previous
non-function declaration `
   template<class _CharT, class _Traits =
std::char_traits<_CharT> > class
   std::istreambuf_iterator'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75:
conflicts with function
   declaration `int
std::istreambuf_iterator(istream_type&)'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75:
request for member `rdbuf'
   in `__s', which is of non-aggregate type `int'
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75:
`traits_type' undeclared
   (first use this function)
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75:
parse error before `::'
   token
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75:
only constructors take
   base initializers
/usr/include/c++/3.2.2/bits/streambuf_iterator.h:75:
confused by earlier errors, bailing out
make: *** [BSC_Dict_JElusDictManager.o] Error 1



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux