delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/22/04:03:22

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3D649A95.3503A7BF@photon.com>
Date: Thu, 22 Aug 2002 01:02:29 -0700
From: Dan Mergens <dan AT photon DOT com>
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019