小编Zlu*_*iie的帖子

错误:“preLaunchTask 'C/C++: g++.exe 构建活动文件'已终止,退出代码为 1”

在此输入图像描述

我读到此错误是由于 launch.json 和tasks.json 文件中的某些设置造成的。所以我删除了它们并制作了新的,但它给出了相同的错误并且不会构建和调试。我如何解决它?

启动.json:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build …
Run Code Online (Sandbox Code Playgroud)

c++ json compiler-errors visual-studio-code

7
推荐指数
2
解决办法
5万
查看次数

标签 统计

c++ ×1

compiler-errors ×1

json ×1

visual-studio-code ×1