- To: email@example.com
- Subject: Re: g++
- From: Felix Natter <firstname.lastname@example.org>
- Date: 07 Aug 2000 22:59:30 +0200
- Message-id: <email@example.com>
- In-reply-to: <firstname.lastname@example.org>'s message of "Wed, 2 Aug 2000 11:58:00 -0400 (EDT)"
- References: <Pine.GSO.3.95.1000802115502.7682A-100000@fcrao1>
> I upgraded my machine to potato but in compiling a c++
> program which before used to work with
> g++ -lg++ filename.cc,
> now I need
> g++ -I/usr/include/g++-2/ -lg++ filename.cc
-lg++ links libg++, which are auxiliary, non-standard
convenience-classes that are no longer maintained.
What you want is libstdc++, and you don't need to specify this explicitly
when linking with g++ (as opposed to ld).
> two questions:
> 1) WHy do I need the -I now and
-I/usr/include/g++-2/ might simply include the libstdc++-headers ?
but these should really be included by default.
(are you using gcc 2.95.2 ?)
for example, on my system using libstdc++-v3 (the latest version under
felix@home:~ > ls <prefix>/include/g++-v3/
algorithm cfloat cstddef ext istream ostream strstream
atomicity.h ciso646 cstdio fstream iterator queue typeinfo
backward climits cstdlib fstream.h limits set utility
bits clocale cstring functional list shadow valarray
bitset cmath ctime iomanip locale sstream vector
bu complex cwchar ios map stack
cassert csetjmp cwctype iosfwd memory stdexcept
cctype csignal deque iostream new streambuf
cerrno cstdarg exception iostream.h numeric string
(the ones for gcc 2.95.2 will look a little differently)
> 2) The second command doesnt work. It complains
> /usr/bin/ld: cannot find -lg++
> collect2: ld returned 1 exit status
> though all the libraraies are in /usr/lib. Any ideas?
- From: <email@example.com>