无法将C ++编译器集成到VSC

时间:2019-07-07 16:19:51

标签: c++ visual-studio-code

每当我在VSC中使用终端时,我都无法运行代码,但是当我在VSC之外使用cmd时,它将起作用

我尝试编辑c_cpp_properties.json

{
"configurations": [
    {
        "name": "Win32",
        "includePath": [
            "${workspaceFolder}/**"
        ],
        "defines": [
            "_DEBUG",
            "UNICODE",
            "_UNICODE"
        ],
        "intelliSenseMode": "msvc-x64",
        "browse": {
            "path": [
               "${workspaceRoot}",
               "C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++"
            ], 
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
        }

       }
   ],
     "version": 4
 }

错误消息:

g++ : The term 'g++' is not recognized as the name of a cmdlet, function, script file, or operable program. Check 
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ g++ primary.cpp
+ ~~~
    + CategoryInfo          : ObjectNotFound: (g++:String) [],     CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

0 个答案:

没有答案