It is currently Thu, 25 Feb 2021 07:49:27 GMT

Author Message
 g++ Questions: Do I need to upgrade g++?

I'm a seasoned programmer who's using g++ on Linux to learn C++. I've
run into two problems regarding support for "standard" features. I'm
currently operating under the assumption that the problems I'm seeing
stem from old software. I installed Linux using an old Slakware CD (1.2
kernel), and then  upgraded the kernel to 2.0.30. "g++ --version"
reports I'm not sure how to check the version of the libraries.

What I would like to know is
1) Are the following two problems really are due to old g++/libraries?
2) If so, how do I upgrade g++ and the applicable libraries?
   (My brains looks at it as a "chicken-and-egg" situation.)
3) If not, what remedies are available (even if it's "shut up and

Problem #1: (minor; annoying)
STL vector<> doesn't have a "resize" property as described in my STL
book "C++ Programmer's Guide to the Standard Template Library" by Mark
Nelson. I wrote a function that implements it, but still....

Problem #2: (IMHO major as I'm trying to learn C++)
When I try to use namespaces, I get the message:

nspace.h:10: warning: namespaces are mostly broken in this version of

and all of Haedes breaks loose -- code that comples without namespaces
suddenly gets all kinds of bizzaire compilation errors.

I'd like to learn about namespaces!

Thank you very much!


 Fri, 24 Mar 2000 03:00:00 GMT   
 g++ Questions: Do I need to upgrade g++?

Well, there's egcs, which is essentially a later version of gcc with
things (like g77) integrated.  See for info.

As for the problems you mentioned, the template one may be fixed in
egcs (don't know enough about that stuff); the namespace support is
still very incomplete as I recall.  It doesn't sound like any gcc
series compiler has it yet.

Not surprising really, given the way the ANSI committee keeps doing
wholesale redesigns on the language every week or two...

! Paul Koning, NI1D, C-24183
! Xedia Corporation, 119 Russell Street, Littleton, MA 01460, USA
! phone: +1 508 952 6000 ext 115, fax: +1 508 952 6090
! email:
! Pgp:   27 81 A9 73 A6 0B B3 BE 18 A3 BF DD 1A 59 51 75
! "The only purpose for which power can be rightfully exercised over
!  any member of a civilized community, against his will, is to prevent
!  harm to others.  His own good, either physical or moral, is not
!  a sufficient warrant."    -- John Stuart Mill, "On Liberty" 1859

 Sat, 25 Mar 2000 03:00:00 GMT   
 g++ Questions: Do I need to upgrade g++?

On Mon, 06 Oct 1997 16:20:43 -0600, James Knowles

Handling of namespaces and templates do seem to be amongst the most
major things broken in versions of G++ before 2.8.x.  (Note that 2.8.x
hasn't been released, so we don't yet know how "fixed" they are in

The "egcs" Project is seeking to quickly fix these and other such
problems; you may want to see what they've done.  Look for egcs at:
< http://www.**-**.com/ ; for lots more details.  They're doing
regular releases of updated code in similar fashion to the way there
are roughly-weekly Linux kernel updates.  You may want, at some point,
to try out one of the interim egcs releases.
--, < http://www.**-**.com/ ~cbbrowne>   Q: Where would Microsoft
take you today?  A: Confutatis maledictis, flammis acribus {*filter*}is...
Spam bait: dom...@{*filter*}

 Sat, 25 Mar 2000 03:00:00 GMT   
   [ 3 post ] 

Similar Threads

1. Need advice/help upgrading kernel/gcc/g++/etc...

2. GNU G++ program Segmentation Faults -- need to upgrade?

3. Why is g++ symlinked to g++?

4. (1) SHE died when g++...(2) g++ FAILed, 4 HELP

5. Why is g++ symlinked to g++?

6. g++ doing strange things

7. upgrade GCC/G++ with binaries - how?

8. Upgrade to g++ 3.0.1 from 2.96

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software