ubuntu20.04+Code::Blocks搭建C++开发环境

###环境
新安装的系统:Ubuntu20.04

1、环境c++环境安装

查看环境是否安装完成 c++、gdb、make、cmake、cmake-qt-ui、codeblocks ,发现有些都已安装好

c++ 9.4.0
gdb 9.2
make 4.2.1
cmake 未安装 sudo apt-get install cmake
cmake-qt-ui 未安装 sudo apt-get install cmake-qt-gui
code::blocks 未安装 sudo apt-get install codeblocks

$ c++ --version
c++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gdb --version
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ cmake --version
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

未安装,则请参考这里

安装code::block开发IDE工具

# 安装
sudo apt-get install codeblocks
# 启动
codeblocks

设置默认编译器
在这里插入图片描述在这里插入图片描述
顺利完成安装

C++环境验证(Code:Blocks项目)

(待续)

猜你喜欢

转载自blog.csdn.net/youlinhuanyan/article/details/128738902