Setting Up C with Code::Blocks

Course Outline  |  Previous LessonNext Lesson

Introduction to Integrated Development Environment (IDE)

Users will need to download and install a special software before writing C code. The Integrated Development Environment (IDE) software will be used to write and execute code. It is beneficial to use an IDE due to its features since it increase productivity of the software development. In one feature, IDE helps users detect and locate errors within their code. Another useful feature is code completion. When users write a line of code, the IDE will predict what code they will write for that specific line. The IDE will give a list of predicted code that may be appropriate, and users can accept a prediction from that list. Code::Blocks will be used as an IDE to set up C.

Setting up C with Code::Blocks

As stated recently, Code::Blocks will be used as an IDE for writing C code in this course. It has all the tools you need to successfully create programs. Please follow the steps or watch the video below to successfully download and install Code::Blocks. Please note that the video shows an older version of Code::Blocks. However, the installation and testing process should be the same.


1. Download Code::Blocks from the following link: If you have windows, choose the file with the name “codeblocks-16.01mingw-setup.exe.” Mingw has a piece of software that executes C programs. Without that, Code::Blocks would be useless. Be sure that mingw is in the file name. This is the year of 2017, so if you are reading this in the distant future, be sure to choose the latest version of Code::Blocks with mingw. Refer to the picture below if you have windows and click on the link enclosed in a red-outlined rectangle.

Downloading the C Environment

2. Install Code::Blocks with default settings.

3. Once your installation is complete, check if the installation is successful. Go to File -> New -> Project…. A new window should pop up. Choose Console Application.

console application

4. Proceed with the project setup. Choose C when that option comes up. Click next.

5. Name the project as anything as you would like to call it, then click next.

6. Make sure the compiler option is selected to GNU GCC Compiler. Click finish when finished.

7. On the left side, there will be a project folder with the name “Sources.” Click the plus sign on the left side of the folder name to see the source file called “main.c”. Double click it to see the source file.

Click plus sign

8. After opening up the source file, look for a button with a green play button with a yellow gear behind it. That is the build-and-run button. That button executes the code and make your written software live. That button is located around the top-left area of the IDE. Press that button, and a command-prompt screen should pop out that says, “Hello world!” If you see that, then you have successfully setting up C with Code::Blocks. However, if the command-prompt screen is not showing, then redo the installation and follow the steps carefully.

Course Outline  |  Previous LessonNext Lesson

Leave a Reply

Be the First to Comment!

Notify of