public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc 3.2 and stl
@ 2002-11-04 10:51 Bernhard Rueckerl
  2002-11-04 11:00 ` bjorn rohde jensen
  0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Rueckerl @ 2002-11-04 10:51 UTC (permalink / raw)
  To: gcc-help

Hello,

I downloaded and installed gcc 3.2 on my machine and
now I have problems with stl-containers.

Compiling the code:

file test.cpp:

#include <vector>


main(
     )
{
vector<int> n;

n.push_back(0);
}


with
g++ -o test test.cpp -lstdc++

causes the error:


test.cpp: In function `int main()':
test.cpp:7: `vector' undeclared (first use this function)
test.cpp:7: (Each undeclared identifier is reported only once for each 
function
    it appears in.)
test.cpp:7: parse error before `>' token
test.cpp:9: `n' undeclared (first use this function)


g++ -v delivers:
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ./configure --enable-languages=c,c++
Thread model: posix
gcc version 3.2

uname -a:
Linux asterix 2.2.13 #1 Sat Nov 13 16:24:19 GMT 1999 i686 unknown

Did I make anything wrong or is it a bug?
Is the standard-template-library part of the gcc?

best regards and thanks in advance
Benrhard Rueckerl

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: gcc 3.2 and stl
  2002-11-04 10:51 gcc 3.2 and stl Bernhard Rueckerl
@ 2002-11-04 11:00 ` bjorn rohde jensen
  2002-11-04 13:41   ` gcc 3.1.1 and gdb 5.2.1? Mark Crosland
  0 siblings, 1 reply; 3+ messages in thread
From: bjorn rohde jensen @ 2002-11-04 11:00 UTC (permalink / raw)
  To: bernhard_rueckerl; +Cc: gcc-help

Hi Bernhard,

  STL resides in the std namespace, so you have to
use std::vector or put a using namespace std; etc
in before using STL.

Yours sincerely,

Bjorn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* gcc 3.1.1 and gdb 5.2.1?
  2002-11-04 11:00 ` bjorn rohde jensen
@ 2002-11-04 13:41   ` Mark Crosland
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Crosland @ 2002-11-04 13:41 UTC (permalink / raw)
  To: gcc-help


Hello,

I built gcc 3.1.1 a while ago on sparc solaris8, seems to be working fine.

I built gcc to use /usr/ccs/bin as and ld

Eventually felt the need to build gdb. Downloaded 5.2.1, built OK, using
the /usr/ccs/bin/ as and ld options, but it doesn't run so well. It hangs
for long periods of time with simple commands like "break main". Chewing
up a lot of CPU (doesn't seem to have entirely compute bound...).

Any hints on how to build a gdb for gcc 3.1.1 on solaris8?

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-11-04 21:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-04 10:51 gcc 3.2 and stl Bernhard Rueckerl
2002-11-04 11:00 ` bjorn rohde jensen
2002-11-04 13:41   ` gcc 3.1.1 and gdb 5.2.1? Mark Crosland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).