【问题标题】:How to configure Visual studio code for c++ in ubuntu如何在 ubuntu 中为 c++ 配置 Visual Studio 代码
【发布时间】:2015-10-06 16:29:59
【问题描述】:

如何为 c++ 配置tasks.json

当我使用默认配置并运行 c++ 代码时,它给了我:

Failed to launch external program tsc HelloWorld.ts.
spawn tsc ENOENT

【问题讨论】:

    标签: c++ visual-studio-code


    【解决方案1】:

    这是我的 tasks.json。我在某个地方找到了它,并且使用 Make 对我来说效果很好。

    {
        "version": "0.1.0",
        "command": "make",
        "isShellCommand": true,
        "tasks": [
            {
                "taskName": "Makefile",
                // Make this the default build command.
                "isBuildCommand": true,
                // Show the output window only if unrecognized errors occur.
                "showOutput": "always",
                // No args
                "args": ["all"],
                // Use the standard less compilation problem matcher.
                "problemMatcher": {
                    "owner": "cpp",
                    "fileLocation": ["relative", "${workspaceRoot}"],
                    "pattern": {
                        "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                        "file": 1,
                        "line": 2,
                        "column": 3,
                        "severity": 4,
                        "message": 5
                    }
                }
            }
        ]
    }
    

    【讨论】:

      猜你喜欢
      • 2019-10-29
      • 1970-01-01
      • 2019-04-26
      • 2019-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多