Cgo: sorry, unimplemented: 64-bit mode not compiled in

Downloading the latest TDM-GCC-64 release worked for me! Make sure to add C:\TDM-GCC-64\bin to PATH Environmental Variable.


  1. Short Answer:
    I tried many versions, the Only working version for both 32-bit and 64-bit go build in 64-bit Windows OS is tdm64-gcc-5.1.0-2.exe (see the tdm-gcc page).
    You may install it to C:\TDM-GCC-64\ and add C:\TDM-GCC-64\bin to your PATH (on top = or left).

  1. You may try MinGW-w64 - for 32 and 64-bit Windows Or x64-4.8.1-release-posix-seh-rev5.
    This versions works fine just for the 64-bit build (not 32-bit target on 64-bit OS).

  1. For Windows OS run your command prompt: cmd (terminal in Linux) then run this command (whereis gcc in Linux):

    where gcc
    

    Then if there are multiple gcc paths, then you may edit the order of these and put the one you need in the top or remove all others.


  1. See:
    • Differences between Mingw-w64 and TDM-GCC for a simple GDI project
    • What is the difference between Orwell's MinGW and TDM Dev-C++ versions?

I hope this helps.

Tags:

Go

Cgo