小编Has*_*uad的帖子

gcc 11 未进行调试。它显示“as:无法识别的选项'--gdwarf-5'”

我在我的机器(linux 20.04)上使用自制软件安装了 gcc 11。而且它没有在 vscode 上运行,如图所示

as:无法识别的选项“--gdwarf-5”

不知道是不是路径问题。因为当我安装brew时它告诉我

Warning: /home/linuxbrew/.linuxbrew/bin/ is not in your PATH.
Run Code Online (Sandbox Code Playgroud)

为了解决这个问题,它建议使用这三个命令

echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/hasib/.profile
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/hasib/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
Run Code Online (Sandbox Code Playgroud)

所以,我做了那些。我不知道这是否搞砸了路径。我对Linux有点陌生,所以很困惑。只是想在 vs 上运行 gcc-11

这是我的tasks.json 文件:

{
"tasks": [
    {
        "type": "cppbuild",
        "label": "C/C++: g++ build active file",
        "command": "/usr/bin/g++",
        "args": [
            "-fdiagnostics-color=always",
            "-g",
            "${file}",
            "-o",
            "${fileDirname}/${fileBasenameNoExtension}"
        ],
        "options": {
            "cwd": "${fileDirname}"
        },
        "problemMatcher": [
            "$gcc"
        ],
        "group": {
            "kind": "build",
            "isDefault": true
        },
        "detail": …
Run Code Online (Sandbox Code Playgroud)

c++ linux gnu dwarf gcc11

1
推荐指数
1
解决办法
6092
查看次数

标签 统计

c++ ×1

dwarf ×1

gcc11 ×1

gnu ×1

linux ×1