www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/20/13:02:48

From: Count Razumovsky <umyumm AT cc DOT umanitoba DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: c++, cout problem
Date: Fri, 20 Mar 1998 11:41:45 -0600
Organization: University of Manitoba
Lines: 22
Message-ID: <3512AA59.3168@cc.umanitoba.ca>
NNTP-Posting-Host: castor.cc.umanitoba.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I having this problem with cout that is very weird.  When I'm in RHIDE
and I have the follow code:

#include<iostream.h>

void main(){
	cout<<"hello world";
}

This will compile fine, absolutely no errors compiling.  However when I
go and try to run this I get these two errors:

error: undefined reference to 'cout'

error: world.cc (.text+0x1c): undefined reference to
'ostream::operator<<(const char *)'

What exactly does that mean.  I've tried linker options (-lgpp) but
nothing seems to works.  The compilers lets me use classes and other c++
features but it won't let me use cout.

Does anyone know whats wrong??

- Raw text -


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