Mail Archives: djgpp/2000/10/28/03:33:21
> From: Michael Powe <michael+netscape AT trollope DOT org>
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 27 Oct 2000 15:34:48 -0700
>
> I'm having a problem getting gcc to compile certain sources from within
> an editor (editplus). Normal, ANSI source seems to be fine. However,
> when I try to compile with nonstandard headers/libraries (pdcurses),
> I've been having no luck. Below is the output from using the `-v'
> switch.
[snip]
> -imacros c:/djgpp/lib/../include/sys/version.h -remap NEWDEMO.C
Here's your problem: NEWDEMO.C is in UPPER case. GCC treats a .C
(capital C) file as a C++ program, and tries to invoke a C++ compiler,
cc1plus.exe. I'm guessing that you didn't download and install
gppNNNb.zip package, so you don't have a C++ compiler installed.
Therefore the compilation fails:
> cc1plus c:/djgpp/tmp\ccrWnOub.ii -quiet -dumpbase NEWDEMO.cc -Wall
> -version -o c:/djgpp/tmp\ccvubPwk.s
> gcc.exe: installation problem, cannot exec `cc1plus': No such file or
> directory (ENOENT)
But even if you did have the C++ compiler installed, you might have
had problems, since C and C++ are different languages.
The logic used by GCC to detect the source language is explained in
section 8.5 of the DJGPP FAQ list.
The solution to your problem is to tweak your editor's setup so that
it doesn't up-case the file names. If that is hard or impossible (and
you won't switch to another editor, for money or love ;-), a
workaround would be to invoke the compiler with the "-x c" switch,
which will force the compiler to treat NEWDEMO.C as a C program.
(This is also explained in the above-mentioned section of the FAQ.)
- Raw text -