delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/11/20:44:08

From: fighteer AT cs DOT com (John M. Aldrich)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: absolutely beginner
Date: Wed, 12 Mar 1997 03:50:58 GMT
Organization: Two pounds of chaos and a pinch of salt.
Lines: 64
Message-ID: <33262506.4924081@news.alterdial.uu.net>
References: <3324E0ED DOT 5634 AT ix DOT netcom DOT com> <33255DEF DOT 2DA7 AT cornell DOT edu> <332582e8 DOT 51843288 AT nntp DOT ix DOT netcom DOT com>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp214.cs.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Tue, 11 Mar 1997 16:10:37 GMT, macko AT ix DOT netcom DOT com wrote:

> Of course I have read readme.1st. The problem is that these commands
> work with certain files only, do not work with others. Unable to
> compile for example the test codes those were recommended to us by the
> instructor to try first. According to him these files can test if the
> compiler is able to handle exceptions and templates, which is a must. 

Templates should be okay; I've heard some rumors that exception handling
is not 100% up to snuff in the latest GNU version of C++.  However,
several folks have posted solutions here on the newsgroup/mailing list;
I suggest you visit the archives at
<http://www.delorie.com/pub/djgpp/mail-archives/> and search for "C++"
and "exceptions".

> For IDE I downloaded and installed Emacs first, then  Rhide. I was
> unable to use emacs at all, rhide gives me different error messages.

Please be a bit more specific.  Emacs is supposed to work, but sometimes
encounters problems if you are running it in a long filename environment
(i.e., Win95) but didn't preserve the long filenames when you unzipped
the distribution.  Try using the latest version of WinZIP to unpack
Emacs.

> E.g. I open q2.txt in rhide then try to compile it says: "Don't know
> how to build q2.o from q2.txt. I guess, it is because it can not
> handle *.txt

This is of course correct.  GCC depends on having the right filename
extensions in order to recognize the type of source file it is
compiling.  The full list is in the GCC Info docs under "info gcc
invoking overall", but here's a quick summary:

C source:  .c
C++ source:  .C, .cc, .cpp
Assembly source:  .S (preprocess), .s (do not preprocess)
Object files:  .o
Libraries:  .a

Please note that the compiler (and all DJGPP tools) are CASE SENSITIVE,
and so if you want to name your file .C and still have it be compiled as
C++, you must use the uppercase extension when you run gcc.

> so I rename it to q2.c then the message is  "error:
> iostream.h: no such  file or directory (ENOENT)".

Try calling the program by a valid C++ filename, such as 'q2.cpp'.  The
stuff you are trying to do is C++, and so you have to tell gcc to
compile it as C++.  FYI, I'm not sure, but I think RHIDE has a problem
recognizing the difference between .c and .C as a source filename; if so
you'll have to name it by one of the other extensions.

Also make sure that you downloaded the C++ compiler and libraries!  If
not, then you'll need to go back to SimTel and obtain
'v2gnu/gpp2721b.zip' and  'v2gnu/lgp271b.zip'.

Hope this helps.

---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I      |   mailto:fighteer AT cs DOT com   |
| God's final message to His Creation: | http://www.cs.com/fighteer |
| "We apologize for the inconvenience."| Fight against proprietary  |
|                      - Douglas Adams | software - support the FSF!|
---------------------------------------------------------------------

- Raw text -


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