delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/04/08:49:46

Message-ID: <19971104134812.23181.qmail@dns01.ops.usa.net>
Reply-To: "Hony" <hony AT usa DOT net>
From: "Hony" <hony AT usa DOT net>
To: <djgpp AT delorie DOT com>
Subject: I have problem with template "list"
Date: Tue, 4 Nov 1997 14:48:12 +0100
MIME-Version: 1.0

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01BCE930.AC9E78A0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

 I need help.
I use libg++ 2.7.1 and when I write this small program



#include <list>

int main()
{

list<int> num;
for(int i =3D 0; i < 10; i++)
    num.push_front(i);
return 0;
}

linker wrote this error :

Error: list.o: In function `construct(int *, int const &)':
Error: undefined reference to `operator new(unsigned long, void *)'


I don't know if problem is in my program or in library.

Please reply answer also to my address .




------=_NextPart_000_0000_01BCE930.AC9E78A0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.1008.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<P><FONT color=3D#000000 face=3DArial size=3D2>&nbsp;<FONT size=3D2>I =
need help.<BR>I=20
use libg++ 2.7.1 and when I write this small =
program<BR><BR><BR><BR>#include=20
&lt;list&gt;<BR><BR>int main()<BR>{<BR><BR>list&lt;int&gt; =
num;<BR>for(int i =3D=20
0; i &lt; 10; i++)<BR>&nbsp;&nbsp;&nbsp; num.push_front(i);<BR>return=20
0;<BR>}<BR><BR>linker wrote this error :<BR><BR>Error: list.o: In =
function=20
`construct(int *, int const &amp;)':<BR>Error: undefined reference to =
`operator=20
new(unsigned long, void *)'<BR><BR><BR>I don't know if problem is in my =
program=20
or in library.<BR><BR>Please reply answer also to my address=20
.<BR><BR></FONT></FONT></P></BODY></HTML>

------=_NextPart_000_0000_01BCE930.AC9E78A0--

- Raw text -


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