delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/15/10:34:39

From: led AT dsd DOT northrop DOT com (Le Duc T.)
Subject: Help: undef ref to 'cout',undef ref to 'ostream'::operator<<(char(const*)' (fwd)
To: djgpp AT delorie DOT com (djgpp)
Date: Mon, 15 Jan 1996 09:22:23 -0600 (CST)
Cc: led AT dsd DOT northrop DOT com (Le Duc T.)
MIME-Version: 1.0

> From: yuehong AT brahms DOT udel DOT edu (Yue-hong Zheng)
> 
> I want to compile the following c++ prog.:
> 
> 
> #include <iostream.h>
> main ()
> 
> {
> cout <<"hello";
> return 0;
> }
> 
>  After I do"gcc -v -x c++ prog1.cpp", i got the above error message.
> I also find that iostream.h resides in \djgpp\cplusinc
> 
> 

You need to add -lgpp to link the c++ libraries. The -lgpp option
should be the last option on the command line.

- Raw text -


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