This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
vector
- From: Dan Mergens <dan at photon dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 22 Aug 2002 01:02:29 -0700
- Subject: vector
I'm baffled why this simple program produces the following errors.
Strangly enough, if I remove the push_back call, it compiles without
complaint.
I'm running the latest version of cygwin. I'm sure I'm missing
something...
Thanks,
Dan
-------------- test.C ------------------
#include <vector>
void main() {
vector<int> array;
array.push_back(10);
}
----------------------------------------
$ gcc test.C
/cygdrive/c/DOCUME~1/dan/LOCALS~1/Temp/ccSFn9EF.o(.__malloc_alloc_template<0>::t
ext$_S_oom_malloc(unsigned int)+0x1a):main.C: undefined reference to
`endl(ostre
am &)'
/cygdrive/c/DOCUME~1/dan/LOCALS~1/Temp/ccSFn9EF.o(.__malloc_alloc_template<0>::t
ext$_S_oom_malloc(unsigned int)+0x27):main.C: undefined reference to
`cerr'
/cygdrive/c/DOCUME~1/dan/LOCALS~1/Temp/ccSFn9EF.o(.__malloc_alloc_template<0>::t
ext$_S_oom_malloc(unsigned int)+0x2c):main.C: undefined reference to
`ostream::o
perator<<(char const *)'
collect2: ld returned 1 exit status
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/