Mail Archives: djgpp/2002/04/10/07:27:08
On 10 Apr 2002, Hans-Bernhard Broeker wrote:
> Hmm... yes, looks like it (tested with GCC-2.95.2 on Linux). I'm
> surprised. I was pretty certain that if you did linking and
> compilation in one go, gcc recognized that the source file(s) are in
> C++, so the C++ runtime should be linked in automatically.
It can't do that, except in a small number of very specific and rare
cases (where all the files are compiled and linked in one go). The
reason is that the object file normally doesn't carry any information
about the source language, at least with most debug info formats.
Since most of the programs are linked from object files that were
compiled in a separate run, the special case where GCC could do this is
- Raw text -