Re: g++
- To: debian-user@lists.debian.org
- Subject: Re: g++
- From: Felix Natter <fnatter@gmx.net>
- Date: 07 Aug 2000 22:59:30 +0200
- Message-id: <m3ittcaitp.fsf@mybaby.home.felix>
- In-reply-to: <shashi@fcrao1.astro.umass.edu>'s message of "Wed, 2 Aug 2000 11:58:00 -0400 (EDT)"
- References: <Pine.GSO.3.95.1000802115502.7682A-100000@fcrao1>
<shashi@fcrao1.astro.umass.edu> writes:
> 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
development):
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?
--
Felix Natter
Reply to:
- References:
- g++
- From: <shashi@fcrao1.astro.umass.edu>