BUILD AN NEW C PROJECT AND PROGRAM - Code::Blocks and MinGW

(Note: + precedes a selection or action you need to take.)

Log into a windows machine in the classroom or lab

See the blue handout for instructions, if needed.

Start Code::Blocks

+ Start button + All Programs + CodeBlocks + CodeBlocks
+ close the tip of the day
+ OK in File associations
+ close the scripting console window

Settings

+ Select the menu item: Settings + compiler and debugger
+ Select the tab: other options
+ type: -std=c99 + OK
+ Select the menu item: Settings + Editor
+ Next to the text This is sample text select: choose
+ Select font size: 12 + OK + OK
+ Select the menu item: Settings + Editor
+ Change the tab size to 2 + OK

Build project

+ Create a new project + Empty Project + Go
In the wizard:
+ Next
+ Type a project title for your new project
+ Change the directory name to Z:
if you wish you may use an existing subdirectory
+ Next + Finish

Create the program source file

+ Select the NewFile icon + Empty File + yes
+ Type the file name .c + Save + OK

Type the program and save it

+ Type the heading comment and your program
+ Select the save icon

Build and run the program

+ Select the menu item: Build + Build and Run
+ Select the save icon
+ Correct any errors
+ In the execution window, press any key to close the window
+ Save + Build and Run again

Save the results

When you have tested your results several times successfully, run your program with the test data specified by the instructor to get the final results.

In the exeution results window: + Select the C:\ icon in the top left + Edit + Select all
+ Select the C:\ icon in the top left + Edit + Copy
At the end of your program, paste the results in a comment:

/* Execution results
+ right click here + Edit + paste
*/

+ Select the save icon

Print your program and turn it in

Do not print until you are satisfied the program is correct and the final results are included with the data specified by the instructor.
+ Select File + Print + Print
+ Select: Preferences + Select: Paper/Quality tab
+ In the paper size use the drop down list to selece: Letter + OK
+ Print