
Click the OK button to close the Compiler settings window.The C compiler should be either gcc or optionally gcc-8, the C++ compiler should be g++-8 and the Linker for dynamic libs should be g++-8. button(s) which are marked by the mouse cursor in the below screenshot. It has already been selected in the below screenshot.


Install the latest version of the g++ compiler for C++. In this tutorial, you’ll learn to install Code Blocks on Ubuntu-based Linux distributions. The C++ compiler is not configured for any version of g++ in Ubuntu 18.04 by default, so it has to be configured in the Code::Blocks compiler settings. Your C++ program is not running in Code::Blocks because you do not have a C++ compiler (a version of G++) installed, or if it is installed you have not configured the C++ compiler in the Code::Blocks compiler settings.
