www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/25/08:28:46

From: ouchida AT sirius DOT com (Wayne B. Ouchida)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP and STL
Date: Thu, 21 Nov 1996 16:28:22 GMT
Organization: Sirius Connections
Lines: 23
Message-ID: <329481c7.7900181@news.sirius.com>
References: <3293C87A DOT 7AEF AT yarden DOT yarden DOT ac DOT il>
NNTP-Posting-Host: ppp033-sc2.sirius.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 21 Nov 1996 05:11:54 +0200, Mordo Ezagouri
<mordo AT yarden DOT yarden DOT ac DOT il> wrote:

>Can someone help me using STL with DJGPP ?
>
>Here is my sample program (vector.cpp):
>
>#include <stl.h>
>
>int main()
>{
>	vector<int> v(10);
>	return 0;
>}
>
>I get a linking error:
>vector.cc(.text+0xa0f): undefined reference to 'operator new(unsigned
>long, void *)'
>

You need to include the a C++ library, e.g.,

gcc vector.cpp -o vector.exe -lstdcxx

- Raw text -


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