vendredi 13 mai 2022

program compilation c++11 extension error in c++

I am using Vscode to compile my c++ programs. I have a program in which auto keyword is used. However when I compile it gives me the error. I have installed c++11 extension pack . But I am not able to solve the problem . I am using LLVM compiler on Macbook. I have tried to install gcc but it stopped on make (I am not sure why). Also I have seen in .json file c++11 is present there. I have tried many options but still getting the following error"warning: auto type specifier is a c++ extension" This is codeRunner excecutor map code

 {
        "C_Cpp.updateChannel": "Insiders",
        "code-runner.runInTerminal": true,
        "workbench.colorTheme": "Visual Studio Light",
        "python.pythonPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3",
        "editor.renderWhitespace": "none",
        "workbench.editorAssociations": {
            "*.ipynb": "jupyter-notebook"
        },
        "jupyter.jupyterServerType": "remote",
        "notebook.cellToolbarLocation": {
            "default": "right",
            "jupyter-notebook": "left"
        },
        "python.defaultInterpreterPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3",
        "C_Cpp.default.cppStandard": "c++11",
        "C_Cpp.default.cStandard": "c11",
        "C_Cpp.loggingLevel": "Debug",
        "json.schemas": [
        
        ],
        "code-runner.executorMap": {
        
            "javascript": "node",
            "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
            "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "cpp": "cd $dir && g++ $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "php": "php",
            "python": "python -u",
            "perl": "perl",
            "perl6": "perl6",
            "ruby": "ruby",
            "go": "go run",
            "lua": "lua",
            "groovy": "groovy",
            "powershell": "powershell -ExecutionPolicy ByPass -File",
            "bat": "cmd /c",
            "shellscript": "bash",
            "fsharp": "fsi",
            "csharp": "scriptcs",
            "vbscript": "cscript //Nologo",
            "typescript": "ts-node",
            "coffeescript": "coffee",
            "scala": "scala",
            "swift": "swift",
            "julia": "julia",
            "crystal": "crystal",
            "ocaml": "ocaml",
            "r": "Rscript",
            "applescript": "osascript",
            "clojure": "lein exec",
            "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
            "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
            "racket": "racket",
            "scheme": "csi -script",
            "ahk": "autohotkey",
            "autoit": "autoit3",
            "dart": "dart",
            "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
            "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
            "haskell": "runhaskell",
            "nim": "nim compile --verbosity:0 --hints:off --run",
            "lisp": "sbcl --script",
            "kit": "kitc --run",
            "v": "v run",
            "sass": "sass --style expanded",
            "scss": "scss --style expanded",
            "less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
            "FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
            "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
        }
    }"

Aucun commentaire:

Enregistrer un commentaire