Which MinGW file to use as a C++ compiler -


i have installed mingw , in bin folder can see 7 .exe files compile program:

  1. c++.exe
  2. g++.exe
  3. mingw32-c++.exe
  4. mingw32-g++.exe
  5. gcc.exe
  6. mingw32-gcc.exe
  7. 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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -