Raspberry Pi

How to Install Code::Blocks on Raspberry Pi

Code::Blocks is a free and open-source cross-platform integrated development environment (IDE) used for programming in multiple languages, such as C++, C and Fortran. It has an integrated GUI resource editor, debugger and built-in compiler that allows users to write and run codes. It also has a plugin system that makes it easy for the users to extend the functionality of the IDE.

To install Code::Blocks on Raspberry Pi, the users should follow this guide.

Install Code::Blocks on Raspberry Pi

The Code::Blocks installation is simple on Raspberry Pi and it can be done through the following steps:

Step 1: We need to make sure that all the packages in Raspberry Pi are up to date, and for that purpose, we can run following command:

$ sudo apt update && sudo apt update

Step 2: By executing the following command, you will install Code::Blocks on the system from the Raspberry Pi’s source repository:

$ sudo apt-get install codeblocks

Run Code::Blocks on Raspberry Pi

You can use 2 methods to run Code::Blocks IDE on Raspberry Pi:

Method 1: Run Code::Blocks from Terminal

You can type the below-given command to run Code::Blocks on Raspberry Pi:

$ codeblocks

Method 2: Run Code::Blocks from GUI

Go to the Programming option after selecting the Application menu. Then click on the Code::Blocks IDE option to open the application on the Raspberry Pi desktop.

A window will open with available options; go with the default option detected by your Raspberry Pi system.

Select the “Set as default” option.

Once GNU GCC Compiler has been set to default, click OK.

After clicking OK, the welcome page of Code::Blocks IDE will open.

At this stage, you have successfully installed Code::Blocks on the Raspberry Pi system and you can begin writing code on the IDE.

Remove Code::Blocks from Raspberry Pi.

To remove Code::Blocks, run the following command on the terminal, which will remove the application from Raspberry Pi.

$ sudo apt-get remove codeblocks

Conclusion

Code::Blocks is a free C/C++ and Fortran IDE that is designed to be highly extensible and completely customizable. It can be installed directly using the “apt” command that automatically installs all required packages along with the application. You can then run Code::Blocks from the terminal using the “codeblocks” command or through GUI from the Programming option.

About the author

Hiba Shafqat

I am a Computer Science student and a committed technical writer by choice. It is a great pleasure to share my knowledge with the world in which I have academic expertise.