Mail Archives: djgpp/2000/01/20/14:11:45
Alexei A. Frounze <alex DOT fru AT mtu-net DOT n-o-s-p-a-m DOT ru> wrote:
[*.c vs. *.C file]
Phew, such a long discussion, which could easily have been avoided, if
you had done as the FAQs suggest: add '-v' to the gcc command line(s)
and look at the output, or post it here. The difference would have
been really easy to spot (cc1 vs. cc1plus usage).
Lesson to take home: don't use *.c or similar wildcards when calling
gcc directly from command.com or a batch file. They'll turn into *.C,
automatically.
> But why output is casesensitive to input file extension???
Because gcc comes from the world of Unix, where you can have two files
'foo.c' and 'foo.C', in the same directory, and they really are
separate files, not just two way to reach the same file, as in DOS.
In Unix, '.C' is a filename extensions used for C++ files, and
different from '.c', which is for C files. This is also clearly
documented in the gcc docs (node 'Overall Options'):
`FILE.cc'
`FILE.cxx'
`FILE.cpp'
`FILE.C'
C++ source code which must be preprocessed. Note that in `.cxx',
the last two letters must both be literally `x'. Likewise, `.C'
refers to a literal capital C.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -