I have just installed MinGW and in the bin folder I can see 7 .exe files that compile my program:
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?
These follow gcc naming conventions.
You should typically compile C code with a "gcc" variant, and c++ code with a "g++" variant.
Use -o filename
in order to specify the output filename, the default is a.exe