Compile and Run C/C++ Programs from CMD (Install MinGW Compiler on Windows)

preview_player
Показать описание
We install the MinGW C/C++ compilers on Windows. Then we compile and run a C++ Hello World program using G++.

Sometimes it's nice not having to use a heavy weight IDE, but how to compile C/C++ code without an IDE? In this video we install C and C++ compilers for Windows which you can invoke from a command line. We code a simple Hello World program and then compile and run it from CMD.

Download compilers from here:

Download 7-Zip:

Hello World Program:

- - - - Compile Commands - - - -

g++ *.cpp - o main

Chapters:
0:00 - Compile & run from command line
0:21 - Download MinGW compiler
1:42 - Extract the compilers
2:28 - Add compiler directory to PATH variable
3:32 - Test if it worked
4:00 - Coding a Hello World program
5:03 - Compiling the program
5:33 - Thanks!
Рекомендации по теме
Комментарии
Автор

It was very clear and very helpful, thanks a lot!

romaintoro
Автор

Hi, thanks for sharing!
Could I ask a little help?
I'm trying to install a program from Sourceforge, the name is "Open Shoe Designer"....after I download the zip with all files I do not know how to carry I undestand I have to compile and then to run... but which files I have to use? Thank you...

leonelloriondato
Автор

Clear, concise and informative
Thank you

JohnMeathead
Автор

Thank you for posting high level tutorials! I'm looking forward to watch more videos from Wxwidgets series especially about how to use chart libraries or drawing charts.

yasershokoohi
Автор

I really like this video.
Make me independent, which is not depended to an IDE.
So i can choose text editor i like.

GeoSukarno
Автор

What versions of windows does this compiler support

windowsbuilderthegreat