This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcc 3.2 and stl
- From: Bernhard Rueckerl <bernhard_rueckerl at freenet dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 04 Nov 2002 19:49:58 +0100
- Subject: gcc 3.2 and stl
- Reply-to: bernhard_rueckerl at freenet dot de
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