-
You need all the exe's because gcc/g++ calls them in background for you.
For example,
ld.exe is the linker
as.exe is the assembler
ar.exe is the archiver (for making libraries)
gdb.exe is the GNU Debugger
gprof.exe is the GNU profiler (tells you where your program spends its time)
gcov.exe is a test coverage program (tells you what lines of your code are actually run)
make.exe is a build system (makes building multi-file projects easier)
Those are the ones I know... I'm sure you can Google the rest up if you wanted to.
-
I'd like to point out that "gcc -c" will compile to object file, and it will "do the right thing" if your file is called .cpp for example, and compile it as C++. The -x option is only meaningful when the extension is "wrong" - e.g. someone copied a load of .C files to a machine which doesn't make a distinction between .c and .C (the latter is a C++ file in Unix/linux-land) - then instead of renaming all the files to .cpp, you could use "gcc -x C++" (or whatever the syntax is).
However, when building the final executable, g++, as Laserlight hints, will include the C++ standard library, as well as the C standard library. gcc will only include the C standard library - if you have C++ code that uses the C++ standard library [and it may well do that even if you didn't think so, since a fair amount of C++ "behind the scenes" are solved by linking to the library functions - for example constructors/destructors for global variables are handled by the C++ library, as well as some of the handling of exceptions.
--
Mats