int main (int argc, char * argv[])
{
vector<int> v(10);
return 0;
}
when i compiled with g++ (version 3.1) on unix with command
g++ myfile.cpp
then it shows
Undefined first referenced
symbol in file
std::__default_alloc_template<(bool)1, (int)0>::deallocate(void*, unsigned)/tmp/cc6Ct9tU.o
std::__default_alloc_template<(bool)1, (int)0>::allocate(unsigned)/tmp/cc6Ct9tU.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
This looks to me like GCC is configured or installed incorrectly. But if you are using GCC 3.1, you've got bigger problems than a mis-configured compiler.
g++ (GCC) 3.1
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.