How to Create a New Code::Blocks Project in C
In the C programming language, a console application is one that runs in Text mode in a terminal window. Even though an integrated development environment is capable of more, that’s the best way to teach basic programming concepts without overwhelming you with a large, complex, graphical beast of a program. Here’s how it works:
You see the Start Here screen, which displays the Code::Blocks logo and a few links. If you don’t see the Start Here screen, choose File→Close Workspace.
Click the Create a New Project link.
The New from Template dialog box appears.
Choose Console Application and then click the Go button.
The Console Application Wizard appears.
You can place a check mark by the item Skip This Page Next Time to skip over the wizard’s first screen.
Click the Next button.
Choose C as the language you want to use, and then click the Next button.
C is quite different from C++ — you can do things in one language that aren’t allowed in the other.
Type ex0101 as the project title.
When you set the project title, the project’s filename is automatically filled in.
Click the … (Browse) button to the right of the text box titled Folder to Create Project In.
You should create and use a special folder for all practice projects.
Use the Make New Folder button in the Browse for Folder dialog box to create a project folder.
If you already have a programming projects folder, create a new subfolder.
If you don’t have a programming projects folder, under your account’s Main or Home folder, create a subfolder named prog and then create another folder, named c. Finally, create a subfolder named BegC4D and choose it for saving the project.
Click the OK button to select the folder and close the dialog box.
Click the Next button.
The next screen (the last one) allows you to select a compiler and choose whether to create Debug or Release versions of your code, or both.
The compiler selection is fine; the GNU GCC Compiler (or whatever is shown in the window) is the one you want.
Remove the check mark by Create Debug Configuration.
You create this configuration only when you need to debug, or fix, a programming predicament that puzzles you.
Click the Finish button.
Code::Blocks builds a skeleton of your project, which you may not yet see in the program’s window. For a simple command-line project, the skeleton is a source code file — a plain-text file that contains the C programming code to help start your project.
A console application is one of the simplest programs you can create. If you were building a Windows program, Code::Blocks would create other elements for you and display tools for designing the window, crafting an icon, and working with other required bits and pieces. The IDE makes it easy to work with all that stuff.