www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/09/07:26:43

Date: Wed, 9 Oct 1996 13:14:18 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Kim Robert Blix <norsk AT interlink DOT no>
Cc: djgpp AT delorie DOT com
Subject: Re: So.. What can be wrong here?
In-Reply-To: <53epl5$5m0@ranger.interlink.no>
Message-Id: <Pine.SUN.3.91.961009131033.8710B-100000@is>
Mime-Version: 1.0

On 8 Oct 1996, Kim Robert Blix wrote:

> compiled with "gcc hello.C" ..
> I get a "undefined reference to 'cout'"
> and     "undefined reference to 'ostream::operator<<(char *)' 
> (not sure if the last line is 100 percent correct though.)

The FAQ clearly advises (in section 8.7) to use `gxx' rather than `gcc'
when compiling C++ program, like so: 

	gxx hello.C

(Btw, I suggest you call your C++ source files .cc, to avoid the problems
of DOS case-insensitivity.)

`gxx' will then automatically instruct the linker to search the 
appropriate C++ libraries, and you won't see those error messages 
anymore.

- Raw text -


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