why does launch.json keep asking me which task?

  Kiến thức lập trình

I was given this tasks.json file, but but I’m seeing two problems.

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build",
            "type": "shell",
            "command": "g++",
            "args": [
                "-std=c++11",
                "-o",
                "your_program_name",
                "your_source_file.cpp",
                "-I/opt/homebrew/opt/fltk/include",
                "-lfltk",
                "-lGL",
                "-lGLU",
                "-lglut"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": [
                "$gcc"
            ]
        }
    ]
}
  1. Every time I press command-shift-B, it asks me which one of two tasks I want to use: CMake: build, or CMake: clean rebuild. I would be happy to permanently select the first. How can I do that?

  2. same file, a second issue which may or may not be related:

build task started….
/Users/ken/.vscode/extensions/powertech.powercpp-23.2.24/thirdparty/bin/cmake
–build /Users/ken/Prog24/flgl/build –config Debug –target all —
Error: could not load cache build finished with error(s).

What does this mean, “could not load cache”? Is this some problem with a malformed tasks.json file?

LEAVE A COMMENT