This is the mail archive of the gcc-help@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 and stl


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


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