Mail Archives: djgpp/1997/03/11/20:44:08
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 -