Mail Archives: djgpp/1998/01/31/16:31:05
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 -