This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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 gcc version is written below:
------------------------------
gcc -v
Reading specs from 
/usr//bin/../lib/gcc-lib/i586-mandrake-linux-gnu/3.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib 
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info 
--enable-shared --enable-threads=posix --disable-checking 
--enable-long-long --enable-__cxa_atexit 
--enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu 
--with-system-zlib
Thread model: posix
gcc version 3.2 (Mandrake Linux 9.0 3.2-1mdk)




--------------------

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]