Linked Questions

Popular Questions

Why my C code can't compile successfully?

Asked by At

Im having problems in compiling my C code. I've installed correctly the compiler, downloaded the extensions and today the program decide to not compile.

i upgraded my MinGW compiler, reinstalled the extensions, but not helped me.

image of the error

i searched in a lot of places, change my tasks.json; launch.json, but nothing worked. Can someone help me?

launch.json

{
  "configurations": [
      {
          "name": "C/C++: gcc.exe build and debug active file",
          "type": "cppdbg",
          "request": "launch",
          "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
          "args": [],
          "stopAtEntry": false,
          "cwd": "C:\\MinGW\\bin",
          "environment": [],
          "externalConsole": false,
          "MIMode": "gdb",
          "miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
          "setupCommands": [
              {
                  "description": "Enable pretty-printing for gdb",
                  "text": "-enable-pretty-printing",
                  "ignoreFailures": true
              },
              {
                  "description": "Set Disassembly Flavor to Intel",
                  "text": "-gdb-set disassembly-flavor intel",
                  "ignoreFailures": true
              }
          ],
          "preLaunchTask": "C/C++: gcc.exe build active file"
      }
  ],
  "version": "2.0.0"
}

tasks.json

{
  "tasks": [
      {
          "type": "cppbuild",
          "label": "C/C++: gcc.exe build active file",
          "command": "C:\\MinGW\\bin\\gcc.exe",
          "args": [
              "-fdiagnostics-color=always",
              "-g",
              "${file}",
              "-o",
              "${fileDirname}\\${fileBasenameNoExtension}.exe"
          ],
          "options": {
              "cwd": "C:\\MinGW\\bin"
          },
          "problemMatcher": [
              "$gcc"
          ],
          "group": {
              "kind": "build",
              "isDefault": true
          },
          "detail": "Task generated by Debugger."
      }
  ],
  "version": "2.0.0"
}

Related Questions