安装gcc
和g++
编译环境方法很简单,一行命令搞定。在终端输入:
sudo apt-get install build-essential
sudo yum -y install gcc gcc-c++ kernel-devel
等待安装gcc,出现Complete!即可说明安装成功。
验证是否安装成功,可以依次输入gcc --version
、g++ --version
来查看安装的gcc
和g++
的版本号。
root@DESKTOP-MLOFRB3:/home/sogrey/libdxfrw/release# gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 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.
root@DESKTOP-MLOFRB3:/home/sogrey/libdxfrw/release# g++ --version
g++ (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 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.