delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/25/11:55:26.1

From: rplatlanta AT aol DOT com (RPLATLANTA)
Newsgroups: comp.os.msdos.djgpp
Subject: Problem. Please Help. Thanks.
Lines: 23
NNTP-Posting-Host: ladder07.news.aol.com
X-Admin: news AT aol DOT com
Date: 25 Jun 1999 01:27:25 GMT
Organization: AOL http://www.aol.com
Message-ID: <19990624212725.22553.00003367@ng-fv1.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

with the code:

#include <iostream.h>

int main();
int main ()
{
   cout << "Hello World!\n";
   return 0;
}


i typed:

gcc hello.cpp -o hello.exe

and received the error message:

C:\WINDOWS\TEMP\cccyeivk(.text+0x19):hello.cpp: undefined reference to 'cout'
C:\WINDOWS\TEMP\cccyeivk(.text+0x1e):hello.cpp: undefined reference to
'ostream::operator<<(char const *)'

could someone please tell me what to do? thanks.

- Raw text -


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