delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/31/16:31:05

From: jstuder AT flash DOT net
Newsgroups: comp.os.msdos.djgpp
Subject: Re: newbie + iostream.h
Date: Sat, 31 Jan 1998 21:19:36 GMT
Organization: Flashnet Communications, http://www.flash.net
Lines: 32
Message-ID: <34d3942a.21507302@news.flash.net>
References: <199801272138 DOT KAA03399 AT cirrostratus DOT netaccess DOT co DOT nz>
NNTP-Posting-Host: albtc2-97.flash.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Wed, 28 Jan 1998 09:30:56 +0000, "Richard Chappell"
<chapmic5 AT cirrostratus DOT netaccess DOT co DOT nz> wrote:

>> From:          Jim Brooks <jimb AT diablo DOT intergate DOT bc DOT ca>
>> Subject:       re: newbie + iostream.h
>> Date:          Tue, 27 Jan 1998 00:42:01 -0800
>> Organization:  Internet Gateway Corporation
>> Reply-to:      jimb AT diablo DOT intergate DOT bc DOT ca
>> To:            djgpp AT delorie DOT com
>
>> I installed djgpp and rhide. when i entered the standard c hello world,
>> it compiled and ran without problems. However when I tried a C++
>> version, the compiler couldn't find iostream.h. I added an included
>> reference to it in lang\cxx but now a large number of errors are
>> reported. All suggestions/comments greatfully accepted.
>> Jim Brooks
>
>did you save your source file as *.cpp or *.cc ??

This is a good point.  I saved my C++ file as a *.C file.  This is
okay and recognized by gxx as a C++ file BUT, if you type gxx myfile.c
instead of gxx myfile.C, gxx will look for a *.c file, and find your
*.C file instead ( blame that on DOS ).  Basically, the command line
is case sensitive, if gxx thinks it is compiling a *.c file, it will
only look for C libraries, if it thinks it is looking for a *.C file,
it will only look for C++ files.

Solution:  call your files *.cc, or, better yet, *.cpp, that way you
avoid this trouble.  It took my too many hours to figure that silly
tidbit out.

Jeff

- Raw text -


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