iClickers in Lecture
Advice from TAs
Advice from Students
Collaboration Policy &
Due Date and Time
Late Day Policy
HW Grading Criteria
Code Editors & IDEs
Misc. C++ Programming
Command Line Args
string → int/float
How to Install MinGW / Minimalist GNU for Windows
WARNING: These instructions are out of date...
Download the installer
Execute the Installer
- If you want the .bat script to work later on, you need to use the Default Location.
- Make sure to select "Graphical (GUI) Installation" before continuing!
- Select the following packages:
- mingw32-base (C compiler + debugger)
- mingw32-gcc-g++ (C++ compiler + debugger)
- Goto Installation -> Apply Changes
- Wait until the installation finishes, and then close the MingW Installation Manager.
Finishing Install: Execute the provided .bat file
- This adds the location of your compiler to your machine's PATH variable
- Having the location of the compiler in the PATH variable is required to access the compiler in CMD
NOTE: The following instructions are for the CMD shell. Alternatively, you can install the MSYS shell for a more UNIX-like environment.
- Open your command prompt. On any Windows Computer, pressing
Windows+R opens the run window, then type:
- Navigate to the directory of your program's source files using cd.
Note that the Windows CMD uses \ (backwards slashes) to separate Folders, not /
- Use dir to show the files in your current location
- When you're in your project folder, execute g++ as you would normally, i.e.:
g++ main.cpp -o main.exe -Wall
- To execute your program, type:
- GDB for MinGW functions the same as its Linux and Cygwin counterparts
- Refer to Step 3 to access the command prompt and change the directory
- Refer to Debugging Lab for a "How To" on using GDB