[Go] Solve the problem of exec: “gcc” executable file not found in %PATH% error when using cgo

Download the compressed package that matches your own system version

https://sourceforge.net/projects/mingw-w64/files/mingw-w64/

I am 64 bit, download this version

 

 After decompressing directly, put the bin directory into the PATH environment variable.

 If you are using goland ide development

To restart goland, if it still doesn’t work, use the system’s own cli window first

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *