Shubham Avasthi
Shubham Avasthi

Reputation: 192

What is the difference between g++.exe and x86_64-w64-mingw32-g++.exe?

Same question goes for gcc, ar, etc. as well.

On changing the toolchain executable from something.exe to x86_64-w64-mingw32-something.exe in Code::Blocks, the code still compiles perfectly. Also, both 32-bit and 64-bit modes work perfectly in both the cases.

g++ -v and x86_64-w64-mingw32-g++.exe -v show the same output on command line.

If these are exactly the same, why are they provided as different executables?

Upvotes: 2

Views: 9397

Answers (1)

user2596667
user2596667

Reputation: 46

x86_64-w64-mingw32-g++.exe is a cross compiler, for compiling code that can run on a different type of computer than the one it was compiled on (based on the name, it looks like Windows 64-bit). g++ is the regular compiler, for compiling code to run on the same computer or same type of computer. On your system (e.g. if your system is 64-bit Windows) it's possible that they do the same thing.

Upvotes: 3

Related Questions