Which MinGW file to use as a C++ compiler -
i have installed mingw , in bin folder can see 7 .exe files compile 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 each of them; a.exe
file generated in bin folder , runs correctly.
what's difference between them , 1 should use? also, can change name of output file a.exe testprog.exe automatically upon each successful compile?
it's quite possible same; either exact copies or symbolic links 1 another. try using --version
flag on each see you've got. on minggw installation here, each of binaries differs (checked diff
), output same version information (with exception of first bit, filename):
gcc.exe (gcc) 3.4.5 (mingw-vista special r3) copyright (c) 2004 free software foundation, inc. free software; see source copying conditions. there no warranty; not merchantability or fitness particular purpose.
use -o
flag change output file name:
gcc -o testprog.exe testprog.cpp
Comments
Post a Comment