How to install Code Blocks 13.12 on Linux Mint 18.3

To install Code Blocks 13.12 on Linux Mint 18.3

The Code Blocks is a free, open-source cross platform IDE that supports multiple compilers including GCC, Clang and Visual C++. It has its own compilers, code editor, debugger, GUI desinger, user migration and more. It is so simple to install Code Blocks 13.12 on Linux Mint 18.3.


Instaling Code Blocks

First, make sure you add the necessary repository package to install code blocks and for that, you need to make use of the following command.

linuxhelp ~ # add-apt-repository ppa:eugenesan/ppa
You are about to add the following PPA:
 This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted.
.
.
gpg: requesting key 8313A596 from hkp server keyserver.ubuntu.com
gpg: key 8313A596: public key " Launchpad synergy+"  imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

The repositories are added successfully. Now update the repo by executing the apt-get update command.

linuxhelp ~ # apt-get update 
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease
Ign:3 http://packages.linuxmint.com sylvia InRelease                                                                 
Get:4 http://ppa.launchpad.net/eugenesan/ppa/ubuntu xenial InRelease [17.5 kB]             
.
.
Get:29 http://archive.ubuntu.com/ubuntu xenial-backports/universe i386 Packages [7,064 B]                                                    
Get:30 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3,812 B]                                                   
Fetched 5,472 kB in 8s (661 kB/s)                                                                                                            
Reading package lists... Done

After the system package repositories has been updated install the code block using the following command.

linuxhelp ~ # apt-get install codeblocks
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  codeblocks-common libcodeblocks0 libwxbase3.0-0v5 libwxgtk3.0-0v5
Suggested packages:
  libwxgtk3.0-dev codeblocks-contrib
Recommended packages:
  Xterm
.
.
Setting up libcodeblocks0 (13.12+dfsg-4) ...
Setting up codeblocks-common (13.12+dfsg-4) ...
Setting up codeblocks (13.12+dfsg-4) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...

Once the Code Block installation is through, you can launch the application by using the Linux Mint search field.



With this, the tutorial on installation of Code Blocks on Linux Mint 18.3 comes to an end.

Comment
fahim
Oct 09 2019
The programs are building fine, but not running. Having problem with running any code.
Add a comment
FAQ
Q
How do I troubleshoot a compiler problem?
A
I would start by turning on full Compiler logging.

This is done by selecting the "Full command line" option Under menu "Settings" -> "Compiler" -> Global compiler settings -> [the compiler you use] -> "Other Setting" tab, "Compiler logging". In 12.11 and newer this is enabled by default.

This option will make Code::Blocks output the exact commands it uses to compile your code.

Things to remember:

Look at the "Build Log" NOT the "Build Message" tab
Do a re-build instead of build in order to get a full build log.
You should review all the commands and their options;
If you have compiled your app before, do a re-build (or clean before build) to see all compiling / linking steps;
If you don't know what an option or a command does please read the documentation for the compiler/linker you're using;
Q
I have downloaded MS VC++ Toolkit 2003 for a compiler. How do I tell Code::Blocks that it is my compiler?
A
Click on "Project/Build options" and select the compiler you want for your project/target.
Q
What compiler can I use with Code::Blocks?
A
Code::Blocks philosophy is to be able to use any compiler on earth! Well, almost.

As a matter of fact it largely depends on the used compiler plugin. Some provided with the default Code::Blocks installation are GNU GCC (MinGW/Cygwin), MS Visual C++ Free Toolkit 2003, Borland's C++ Compiler 5.5, DigitalMars Free Compiler., OpenWatcom, Small Device C Compiler (SDCC) and others.
Q
My project should be compiled with a custom makefile. Is it possible with Code::Blocks?
A
Yes, you can. You need to change one settings with Code::Blocks 8.02:

In your project's Properties, check "This is a custom makefile".
Q
All of the Build related options are grayed out?
A
Code::Blocks checks the file extension for individual files before allowing them to be compiled. Save your file with the correct file extension (*.c or *.cpp).

More often it is useful to create a project so that Code::Blocks can manage the entire build.