I have just installed MinGW and in the bin folder I can see 7 .exe files that compile my program:
- c++.exe
- g++.exe
- mingw32-c++.exe
- mingw32-g++.exe
- gcc.exe
- mingw32-gcc.exe
- mingw32-gcc-4.4.1.exe
My small program (testprog.cpp) compiles correctly with each of them; the a.exe file is generated in the bin folder and it runs correctly.
What’s the difference between them and which one should I use?
Also, what can I do to change the name of the output file from a.exe to testprog.exe automatically upon each successful compile?
It’s quite possible that they are all the same; either exact copies or symbolic links to one another. Try using the
--versionflag on each to see what you’ve got. On my MingGW installation here, each of those binaries differs (checked withdiff), but they all output the same version information (with the exception of the first bit, which is the filename):Use the
-oflag to change the output file name: