![尝试在 manajro 上的 vscode classic 中编译 C 程序时,找不到“C/C++:gcc 构建和调试活动文件”](https://linux22.com/image/217968/%E5%B0%9D%E8%AF%95%E5%9C%A8%20manajro%20%E4%B8%8A%E7%9A%84%20vscode%20classic%20%E4%B8%AD%E7%BC%96%E8%AF%91%20C%20%E7%A8%8B%E5%BA%8F%E6%97%B6%EF%BC%8C%E6%89%BE%E4%B8%8D%E5%88%B0%E2%80%9CC%2FC%2B%2B%EF%BC%9Agcc%20%E6%9E%84%E5%BB%BA%E5%92%8C%E8%B0%83%E8%AF%95%E6%B4%BB%E5%8A%A8%E6%96%87%E4%BB%B6%E2%80%9D.png)
当我单击箭头按钮时:
我得到这些选项:
我正在寻找选择权
C/C++: gcc build and debug active file
。这是新安装的 manjaro 和 vscode。 VSCode是通过snap安装的,安装的是经典版。
这是以下的输出gcc --version
:
gcc (GCC) 12.2.1 20230201 版权所有 (C) 2022 Free Software Foundation, Inc。这是免费软件;请参阅复制条件的来源。没有保修;甚至不是为了适销性或特定用途的适用性。
输出snap info --verbose code
:
summary: Code editing. Redefined.
health:
status: unknown
message: health has not been set
publisher: Visual Studio Code (vscode✓)
store-url: https://snapcraft.io/code
contact: https://twitter.com/code
links:
contact:
- https://twitter.com/code
website:
- https://code.visualstudio.com/
license: unset
description: |
Visual Studio Code is a new choice of tool that combines the
simplicity of a code editor with what developers need for the core
edit-build-debug cycle.
commands:
- code
- code.url-handler
notes:
private: false
confinement: classic
devmode: false
jailmode: false
trymode: false
enabled: true
broken: false
ignore-validation: false
snap-id: Ht0aUHi7ofh9Fbwh6m7jUN2pAy6kzBiu
tracking: latest/stable
refresh-date: today at 10:49 CET
channels:
latest/stable: 5e805b79 2023-03-09 (121) 250MB classic
latest/candidate: ↑
latest/beta: ↑
latest/edge: ↑
installed: 5e805b79 (121) 250MB classic
我的 c_cpp_properties.json 文件:
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c99",
"cppStandard": "c++14",
"intelliSenseMode": "linux-gcc-x86",
"compilerArgs": [
"-Wall"
]
}
],
"version": 4
}