user7074495
user7074495

Reputation:

MinGW using g++ instead of c++ in command line?

This is a fairly simple question, so i'll keep it simple.

I've just installed MinGW onto my windows. When i run the following:

c:/> c++ HelloWorld.cpp && a.exe

However in most tutorials and guides i see online, people will use

c:/> g++ HelloWorld.cpp

It seems to run the same, but i'm not quite sure what the difference is between c++ and g++. Is it a different compiler? a different language? does it run anything differently? Thanks`

Upvotes: 1

Views: 111

Answers (1)

Marcus Müller
Marcus Müller

Reputation: 36462

Same thing. g++ is just the executable (or link) name for then GNU C++ compiler. If you install MinGW, your c++ executable (if present) will point to the GNU C++ compiler – since that is what you installed.

Upvotes: 1

Related Questions