ubuntu18.04配置vscode环境
时间: 2023-09-23 12:10:40 浏览: 162
ubuntu安装vscode
5星 · 资源好评率100%
要配置Ubuntu 18.04上的VSCode环境,您可以按照以下步骤进行操作:
1. 首先,打开终端并输入以下命令以确认您的Ubuntu版本:
```
uname -a
```
2. 通过以下命令安装gcc和g++编译器:
```
sudo apt install gcc
sudo apt install g++
```
3. 启动VSCode,然后在扩展市场中搜索"chinese",安装并重启VSCode以将界面语言改为中文。
4. 创建一个名为`c_cpp_properties.json`的配置文件,打开VSCode并将以下内容复制到该文件中:
```json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/../../**",
"/usr/include/c++/7",
"/usr/include/x86_64-linux-gnu/c++/7"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c11",
"cppStandard": "c17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
}
```
这样,您就成功配置了Ubuntu 18.04上的VSCode环境。您可以开始编写和调试C/C++代码了。<span class="em">1</span><span class="em">2</span><span class="em">3</span><span class="em">4</span>
阅读全文