Ubuntu configures C/C++ development environment

0. Update and upgrade system software

Enter the following command in the terminal to refresh the software to ensure that the subsequent installed software is up to date:

sudo apt update
sudo apt upgrade

About the difference between apt, apt-get, update, upgrade: https://linux.cn/article-14994-1.html

1. Install the build-essential package

build-essential includes the GNU editor collection, GNU debugger, and other necessary development libraries and tools for compiling software. Simply speaking, installing build-essential is equivalent to installing tools such as gcc, g++, and make.

sudo apt install build-essential

insert image description here

Check gcc version:

gcc --version

insert image description here

Check g++ version:

g++ --version

insert image description here

Check make version:

make --version

insert image description here

2. Install gdb

sudo apt install gdb

insert image description here

Check gdb version:

gdb --version

insert image description here

3. Install cmake

sudo apt install cmake

insert image description here

Check cmake version:

cmake --version

insert image description here

Guess you like

Origin blog.csdn.net/qq_42815188/article/details/128733561