www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/01/00:07:52

From: Luc Morin <Bytor AT videotron DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is happening ????
Date: Fri, 31 Jan 1997 21:54:12 -0500
Organization: SPC
Lines: 40
Message-ID: <32F2B054.726E@videotron.ca>
References: <32f25488 DOT 667556 AT news DOT flashnet DOT it>
Reply-To: Bytor AT videotron DOT ca
NNTP-Posting-Host: ppp097.216.msherb.videotron.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eolo Perfido wrote:
> 
> Compiling this incredible stupid code (i'm learning):
> 
> #include <iostream.h>
> #include <stdlib.h>
> 
> main ()
> {
> 
> cout << "eolo";
> 
> return 0;
> 
> }
> 
> I receive this error....
> 
> I compile....
> 
> c:\develop\bin>gcc a1.cc -o a1.exe -lm  (compiling command, is it
> ok??)
> 
> and then....
> 
> c:/develop/tmp\ccdaaaaa(.text+0x16):a1.cc: undefined reference to
> 'cout'
> c:/develop/tmp\ccdaaaaa(.text+x1b):a1.cc: undefined reference to
> 'ostream:operator (((char const *)'
> 

You need to add -liostr to your command line.

Cheers.

-- 
*****************************************************
Luc Morin	<bytor AT videotron DOT ca>
Electrical engineering technologist
*****************************************************

- Raw text -


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