www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/22/16:10:24

From: Ian Chapman <ichapman AT nt DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Why doesn't iostream work??
Date: Thu, 22 Oct 1998 16:48:44 -0400
Organization: Nortel
Lines: 37
Message-ID: <362F9A2C.DC3BD8AE@nt.com>
References: <36228A92 DOT 62A6B474 AT lycosmail DOT com> <362556CA DOT B94B6E96 AT winchendon DOT com>
NNTP-Posting-Host: bcarib90.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.06 [en] (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

cout << "Hello" << endl;
                       ^ 
	Is this an l(L) or 1(one)

	It should be endline an L.

Eric Weiss wrote:
> 
> I just installed djgpp and am not having any luck running this program:
> 
> #include <iostream.h>
> int main(void)
> {
>    cout << "Hello" << endl;
> }
> 
> D:\program files\djgpp>bin\gcc hello.cpp -o hello.exe -lgpp
> 
> generates these error messages:
> 
> d:/progra~1/djgpp/tmp\cccqf32k(.text+0xc):hello.cpp: undefined reference
> to `endl(ostream &)'
> d:/progra~1/djgpp/tmp\cccqf32k(.text+0x16):hello.cpp: undefined
> reference to `cout'
> d:/progra~1/djgpp/tmp\cccqf32k(.text+0x1b):hello.cpp: undefined
> reference to `ostream::operator<<(char const *)'
> d:/progra~1/djgpp/tmp\cccqf32k(.text+0x26):hello.cpp: undefined
> reference to `ostream::operator<<(ostream &(*)(ostream &))'
> 
> I've tried this on 95 and NT with the same results (although NT required
> me to follow the instructions relative to long file names).
> 
> Any ideas?
> 
> Thanks.
> 
> Eric

- Raw text -


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