Thursday, August 06, 2009

difference between gcc and g++

g++ is simply a script that passes a certain set of command line
arguments to gcc, so g++ uses gcc internally, not the other way around.
It used to be an actual bash script in older versions of gcc, now it's a
binary executable, but it still does the same thing.

What's more, the major difference between using "g++" or "gcc" commands
with C++ programs is in linking. "g++" will automatically link the code
with the C++ runtime library (libstdc++), but you must include it
manually if you use "gcc" or "ld".

No comments: