debain和Ubuntu安装c++开发环境

debain和Ubuntu安装c++开发环境

Ensure GCC is installed

Although you’ll use VS Code to edit your source code, you’ll compile the source code on Linux using the g++ compiler. You’ll also use GDB to debug. These tools are not installed by default on Ubuntu, so you have to install them. Fortunately, that’s easy.

虽然您将使用VS代码来编辑源代码,但您将使用g++编译器在Linux上编译源代码。您还将使用GDB进行调试。默认情况下,这些工具不会安装在Ubuntu上,因此您必须安装它们。幸运的是,这很容易

First, check to see whether GCC is already installed. To verify whether it is, open a Terminal window and enter the following command:

首先,检查GCC是否已经安装。要验证是否正确,请打开一个终端窗口并输入以下命令

gcc -v

If GCC isn’t installed, run the following command from the terminal window to update the Ubuntu package lists. An out-of-date Linux distribution can sometimes interfere with attempts to install new packages.

如果没有安装GCC,从终端窗口运行以下命令来更新Ubuntu包列表。过时的Linux发行版有时会干扰安装新软件包的尝试

sudo apt-get update

Next install the GNU compiler tools and the GDB debugger with this command:

接下来使用此命令安装GNU编译器工具和GDB调试器

sudo apt-get install build-essential gdb

参考资料

https://code.visualstudio.com/docs/cpp/config-linux

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值