Lâm Thị Yến Vy
Member
How do I compile with MinGW?
Answer
Install the MinGW Tools for C/C++
Run a C/C++ program on terminal using gcc compiler
Answer
Install the MinGW Tools for C/C++
- Log in to your regular user account.
- Download this MinGW folder and run it.
- Accept the default installation folder C:\MinGW.
- At the Select Component dialog, check the MSYS Basic System.
- Add the C:\MinGW\bin folder to your Windows Path variable.
- Next, verify that the MinGW install was successful.
Code:
https://www.flickr.com/photos/xmodulo/9366550141/in/photostream/
- Open terminal.
- Type command to install gcc or g++ complier:
- Now go to that folder where you will create C/C++ programs.
- Open a file using any editor.
- Add this code in the file:
- Save the file and exit.
- Compile the program using any of the following command:
- To run this program type this command: