delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/15/20:19:48

Xref: news-dnh.mv.net comp.os.msdos.djgpp:4397
From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: I can't compile C++...
Date: Sun, 14 Jan 1996 23:18:01 +1130
Organization: &tSftDotIotE
Lines: 26
Message-ID: <30F8ED71.22A666E0@alcyone.com>
References: <DL70r8 DOT 2Ev AT jade DOT mv DOT net>
NNTP-Posting-Host: newton.alcyone.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Evermore wrote:

> I've been using djgpp flawlessly for months now - at least until I moved
> up to C++. I got the gpp*.* and lgp*.* files, unzipped them and
> everything seemed to work. Now I can still compile C progs fine, but I
> get miles of errors trying to compile any C++ code. When I compiled with
> "-v", it recognized that the file was indeed C++, and it went on it's
> merry way until it started spitting out errors when it saw cin and cout
> (BTW, I did #include<iostream.h>). It didn't give me line numbers for
> where the error occured, so I can only assume the error came from
> somewhere in the guts of gcc itself.

Your errors (you should have mentioned this for quicker response) are
"undefined references," which means that the problems are occuring at _link_
time, not compile time.  In other words, you're not linking the right
libraries.

To get it working, add -liostream at the end of the command at your call to
gcc.

-- 
Erik Max Francis, &tSftDotIotE && uuwest!alcyone!max, max AT alcyone DOT darkside DOT com
San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
_Omnia quia sunt, lumina sunt._ && GIGO Omega Psi && http://www.spies.com/max/
"Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_

- Raw text -


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