delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/13/21:22:55

Date: Tue, 14 Mar 2000 06:52:07 +0500
Message-Id: <200003140152.GAA00837@midpec.com>
From: Prashant TR <tr AT midpec DOT com>
To: "newbie" <hagedorn AT bmts DOT com>
CC: djgpp AT delorie DOT com
In-reply-to: <01bf8d34$c5c06780$e284b7d8@dave> (hagedorn@bmts.com)
Subject: Re: C++ compiling problem
References: <01bf8d34$c5c06780$e284b7d8 AT dave>
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

"newbie" <hagedorn AT bmts DOT com> writes:

> I'm trying to compile a C++ program (I'm using DJGPP 2.95) that uses the
> iostream library.  Whenever I try to use cin or cout I get something like
> this:
> 
> ccRBnmzf.o(.text+0x19):test.cpp: undefined reference to `cin'
> 
> or:
> 
> ccRBnmzf.o(.text+0x1e):test.cpp: undefined reference to
> `istream::operator>>(int&)'
> 
> I've installed all the C++ libraries, and set up all the paths in my
> autoexec.bat.  Any help would be appreciated.  Thanks

You are probably using gcc to do the compilation.

Try this:

gpp test.cpp -o test.exe

- Raw text -


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