delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/10/27/18:16:25

From: "Peter" <peter_data2002 AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <S2Yu9.29661$Mb3 DOT 1242994 AT bgtnsc04-news DOT ops DOT worldnet DOT att DOT net> <Xns92B4B4140FA26asu1cornelledu AT 132 DOT 236 DOT 56 DOT 8>
Subject: Re: Compilation Error
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Message-ID: <ae_u9.9044$VJ5.536853@bgtnsc05-news.ops.worldnet.att.net>
Date: Sun, 27 Oct 2002 23:00:22 GMT
NNTP-Posting-Host: 12.77.28.155
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc05-news.ops.worldnet.att.net 1035759622 12.77.28.155 (Sun, 27 Oct 2002 23:00:22 GMT)
NNTP-Posting-Date: Sun, 27 Oct 2002 23:00:22 GMT
Organization: AT&T Worldnet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi;

I used std::cout and then I was able to compile it using gpp. When I tried
gcc I got following error:
c:/djgpp/tmp/cch1MVAC.o(.text+0x7e):test.cpp: undefined reference to
`operator new(unsigned long)'

c:/djgpp/tmp/cch1MVAC.o(.text+0xa1):test.cpp: undefined reference to
`operator delete(void*)'

c:/djgpp/tmp/cch1MVAC.o(.text+0xd3):test.cpp: undefined reference to
`std::cout'



What is difference between gpp and gcc?
Any idea why gcc gives above errors.

Thanks

"A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu> wrote in message
news:Xns92B4B4140FA26asu1cornelledu AT 132 DOT 236 DOT 56 DOT 8...
> "Peter" <peter_data2002 AT yahoo DOT com> wrote in
> news:S2Yu9.29661$Mb3 DOT 1242994 AT bgtnsc04-news DOT ops DOT worldnet DOT att DOT net:
>
> > test.cpp: In function `int main()':
> > test.cpp:9: `cout' undeclared (first use this function)
> > test.cpp:9: (Each undeclared identifier is reported only once for each
> > function it appears in.)
>
> gcc 3.x adhere better to the C++ standard. use std::cout.
>
> --
> A. Sinan Unur
> asu1 AT c-o-r-n-e-l-l DOT edu
> Remove dashes for address
> Spam bait: mailto:uce AT ftc DOT gov


- Raw text -


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