This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc 3.2 bug with STL
- From: Sourav Ghosh <sourav at cs dot cmu dot edu>
- To: <bug-gcc at gnu dot org>
- Cc: <sourav at cs dot cmu dot edu>
- Date: Sun, 27 Oct 2002 11:05:00 -0500 (EST)
- Subject: gcc 3.2 bug with STL
Hello,
I have not been able to compile a simple program using standard template
library in C++ using gcc 3.2 that came with Mandrake Linux 9.0.
The program "test.cc" is written below
-------------------
#include <iostream>
#include <stdio.h>
#include <string>
#include <set>
#include <vector>
main()
{
vector <int> RV;
}
---------------------------------
This program only declares a variable RV as a vector integers.
The error that I get is the following:
-----------------------------------
$ make test
g++ test.cc -o test
test.cc: In function `int main()':
test.cc:11: `vector' undeclared (first use this function)
test.cc:11: (Each undeclared identifier is reported only once for each
function it appears in.)
test.cc:11: parse error before `>' token
make: *** [test] Error 1
----------------------------
Please let me know if I am missing something.
Thanks,
--Sourav