'g++' is not recognized as an internal or external command, operable program or batch file

前端 未结 2 694
刺人心
刺人心 2020-12-03 12:19
#include
using namespace std;
int main()
{
    cout<<\"hi\"<

I am using Sublime text 3, and I

相关标签:
2条回答
  • 2020-12-03 12:53

    Try to set g++ to your system path.

    You can refer to this: http://stephencoakley.com/2015/01/21/guide-setting-up-a-simple-c-development-environment-on-windows

    0 讨论(0)
  • 2020-12-03 13:05

    For me, it's easily fixed by two steps, as below:

    1. Set the environment variable:

      C:/MinGW/bin

    2. Paste the following code in the "launch.json":

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "C++ Compiler",
                "type": "cppvsdbg",
                "request": "launch",
                "program": "C:/MinGW/bin",
                "args": [],
                "stopAtEntry": false,
                "cwd": "${workspaceFolder}",
                "environment": [],
                "externalConsole": true
            },
        ]
    }
    
    0 讨论(0)
提交回复
热议问题