STL in G++?

Brian Dessent brian@dessent.net
Wed Jun 13 09:41:00 GMT 2007


Dean Anderson wrote:

> The above program won't work on this:
> 
> g++ -v
> Reading specs from
> /usr/local/lib/gcc/sparc-unknown-linux-gnu/3.4.6/specs
> Configured with: ../gcc-34/configure --enable-shared
> --enable-threads=posix --disable-checking --with-cpu=v7
> --enable-languages=c,c++,ada
> Thread model: posix
> gcc version 3.4.6 for GNAT GPL 2006 (20060522)

There is an installation or packaging problem of some kind.  It's
impossible to say what's going on without more details, but it looks
like this version of gcc was built by a third party vendor of Ada tools
who may have just omitted those parts of the compiler from the package,
or put them in an optional package that you don't have installed, or
maybe they never intended for C++ to work and included the g++ driver by
accident, or who knows.  You'd have to ask them.  Point is, this has got
something to do with how this particular gcc was packaged, not any
general absence of libstdc++ in this or any version of FSF gcc >= 3.

> What's up with STL support in g++?  Is there some add-on for STL?

No, there's no add-on.  libstdc++ has been part of gcc for at least six
years and every release since 2.95 includes it.  The library is
installed whenever the C++ language is enabled in --enable-langauges;
and note that c++ is a default language so absense of any
--enable-languages should still build and install it.

Brian



More information about the Gcc-help mailing list