Erich Dollansky wrote:

> Hi,
>
> Framk gave you the answer.

Was the right answer ...

> gcc is a plain c compiler.

... but this is wrong. Gcc determines from the file suffic which language
applies

   .cpp -> c++
   .c   -> C

and so on.

Calling it as g++ vs. calling it as gcc though determines which
runtimes are linked automatically (and partly which include paths are
set).

  gcc -o x x.cpp -lstdc++

works perfectly with the OPs program.

I imagine the use of that is being able to compile with gcc to object
code reagrdless of the language involved, then linking within a
special runtime model, even if object files from multiple languages
are being linked together.

Regards -- Markus


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to