config. ++ задач g.json происходит ошибка: нет входных файлов в vscode

{
    /*
     * http://code.visualstudio.com/docs/editor/tasks
     * 2016.12.23
     */
    "version": "0.1.0",
    "command": "sh",
    "isShellCommand": true,
    "showOutput": "always",
    "args": [
        "-c"
    ],
    "tasks": [
        {
            "taskName": "cpplint",
            "suppressTaskName": true,
            "args": [
                "cpplint --verbose=0 --output=vs7 --linelength=80 ${cwd}/*.*"
            ]
        },
        {
            "taskName": "g++ -std=c++11 -Wall ${file} -o ${fileBasenameNoExtension}.o",
            "args": [
                //"g++ -std=c++11 -Wall ${file} -o ${fileBasenameNoExtension}.o"
            ],
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": [
                    "relative",
                    "${workspaceRoot}"
                ],
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        }
    ]
}

Это мой файл tasks.json в vscode. У меня есть проблема о taskName "g++", когда я вхожу

"taskName": "g++"
"args": ["g++ -std=c++11 -Wall ${file} -o ${fileBasenameNoExtension}.o"]

и нажмите cmd+p, введите task g++, он вернет ошибку:

лязг: ошибка: нет входных файлов

Но, у cpplint (вам нужно $ pip install cpplint самостоятельно) также нет параметров, это хорошо работает, почему? СПАСИБО.

0 ответов

Другие вопросы по тегам