www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/24/23:05:24

From: "Damian Yerrick" <NOSP AT Musenet@pineight.8m.com>
Newsgroups: comp.os.msdos.djgpp
References: <3841B4F1 AT MailAndNews DOT com>
Subject: Re: problem
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Message-ID: <ad2%3.2005$lT.33594@dfiatx1-snr1.gtei.net>
X-Trace: /K49oEVedpeYLe4KAe1duF53J7kNNXaiMxlnQyBegjyzcT7Px+KOxHfOHBgK4kq8pkrQV9NV47eU!3iHNB1QgQa2wWzerVidUtCkQMRJ4u2i4nXJJbxZdr7szEsaROpDQlxYCsmPlam4E3EY=
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Thu, 25 Nov 1999 03:40:54 GMT
Distribution: world
Date: Thu, 25 Nov 1999 03:40:54 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Psycho_Circus" <overtkill AT MailAndNews DOT com> wrote:
> When trying the classic hello world program

// you mean this
#include <iostream.h>
int main()
{
  cout << "hello psycho circus\n";
  return 0;
}
// right?

> I get this error:
>
> undefined reference to 'cout'
> undefined reference to 'ostream::operator<<(char const *)'
>
> Any help is greatly appreciated

You forgot to add -lstdcxx to the end of your gcc
command line when linking the program.
Using gxx instead of gcc will handle this for you.


Damian Yerrick


- Raw text -


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