Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

Basic C++ Program on Visual Studio Code Error: The terminal process terminated with exit code: 1 [closed]

$
0
0

I'm trying to compile a basic "Hello World" program and I'm using Visual Studio Code. Program is written in C++ and when I press CONTROL-SHİFT-B I get an error like this:

The terminal process terminated with exit code: 1

This is my task.json:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "echo",
            "type": "shell",
            "command": "C:/MinGW/bin/g++",
            "args": [
                "-g", "main.cpp"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

This one is c_cpp_properties.json file:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceRoot}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\MinGW\\bin\\gcc.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64",
            "browse": {
                "path": [
                    "${workspaceRoot}/",
                     "C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++"

                ],
                "limitSymbolsToIncludedHeaders": true,
                "databaseFilename": ""
            }

        }
    ],
    "version": 4
}

And this is the program I'm trying to execute:

#include <iostream>
using namespace std;
int main() 
{
    cout << "Hello, World!";
    return 0;
}

How can I fix this problem?


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>