Set up a development environment for C++ on Ubuntu¶
C++ is a compiled language. The GNU Compiler Collection (GCC) is a set of compilers for programming languages, including C, C++, Assembly, and many more. It is the de facto standard in Linux environments and is used to compile both the GNU toolchain and the Linux kernel.
1. Installing GCC compilers for C and C++:¶
If you want a specific version ofg++, you may install it by
for example
An alternative, but common approach is to install the build-essential package, which is a collection of common tools including gcc, g++, and make.
2. Installing debuggers (gdb)¶
The standard debugger developed for GCC is the GNU Debugger (GDB). To install it,
3. Installing build tools (make, backend for cmake)¶
4. Installing build systems (cmake)¶
Setting up cmake APT repository from kitware: https://apt.kitware.com/