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

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What is happening ????
Date: Fri, 31 Jan 1997 22:53:45 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 31
Message-ID: <32F2E879.1B9F@cs.com>
References: <32f25488 DOT 667556 AT news DOT flashnet DOT it>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp211.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eolo Perfido wrote:
> 
> 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 *)'
> 
> Someone understand what is happening ?????
> 
> P.s:I have c++ installed.

Yeah, but you have to instruct the compiler to link the C++ libraries. 
The FAQ discusses this problem in chapter 8.2 (I think), but the quick
answer is to do one of the following:

1) add '-lgpp' to your command line.

2) use 'gxx' instead of 'gcc' to compile your programs; it links the C++
libs automatically.

-- 
John M. Aldrich <fighteer AT cs DOT com>                      

* Anything that happens, happens.
* Anything that, in happening, causes something else to happen,
  causes something else to happen.
* Anything that, in happening, causes itself to happen again, happens
  again.
* It doesn't necessarily do it in chronological order, though.
 
                                       --- Douglas Adams

- Raw text -


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