-3

Error is resolved on Command Prompt

Previously, I was receiving this error on Command Prompt, but was resolved by this approach:

cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

How to resolve error for VS Code debugger

Now, VS Code debugger is throwing the same error:

# runtime/cgo

cc1.exe: sorry, unimplemented: 64-bit mode not compiled in

exit status 2

Process exiting with code: 1

Error screenshot

So far I tried:

  • Restarting VS Code
  • Adding C:\TDM-GCC-64\bin\ to the top of the VS Code terminal path:
set PATH=C:\TDM-GCC-64\bin\;%PATH%

Adding to path

  • Modifying .vscode\launch.json like this:
{
    "version": "0.2.0",
    "configurations": [],
    "environment": [{"name": "Path", "value":  "C:\\TDM-GCC-64\\bin;${env:Path};"}],
}

Screenshot: launch.json

What else can I try?

Megidd
  • 7,089
  • 6
  • 65
  • 142
  • 3
    [Please don't paste images of code or error messages](https://meta.stackoverflow.com/q/303812/13860) – Jonathan Hall Jun 01 '21 at 09:52
  • @Flimzy Code and error messages are added too =) – Megidd Jun 01 '21 at 11:49
  • 1
    Not sure about setting PATH inside VS Terminal, might want to set it globally in your System Settings, and reboot. – rustyx Jun 01 '21 at 11:49
  • @rustyx I have done so :) That's how I resolved the error for Command Prompt. But VS Code debugger is throwing the same error! Looks like it has no effect on VS Code debugger. – Megidd Jun 01 '21 at 11:51
  • 2
    What I mean is set it outside VS Code, in Control Panel -> System -> Advanced -> Environment... Also might want to test compiling a simple C program with `gcc -m64`. – rustyx Jun 01 '21 at 11:52

1 Answers1

-1

As suggested by @rustyx a computer reboot resolved the problem. I don't exactly know why a reboot is needed for VS Code debugger to work.

Megidd
  • 7,089
  • 6
  • 65
  • 142
  • I'm pretty sure a reboot is required to update your PATH variables, so after installing gcc you need to restart for VS Code to recognize the gcc path. – CyanCoding Jul 31 '21 at 04:02