Cgo: exec gcc: exec: "gcc": executable file not found in %PATH%

hi where i run go build :

cgo: exec gcc: exec: “gcc”: executable file not found in %PATH%

i installed MinGW and TDM-GCC-64 and make environement variable but no work !!!

By, “no work,” do you mean that you’re still getting the same error? Have you tried rebooting to make sure programms “see” your new PATH environment variable?

1 Like

yes i reboot

another error

go build

cgo: cannot parse $WORK\b106_cgo_.o as ELF, Mach-O, PE or XCOFF

It’s possible that your previous attempts before rebooting left some incorrectly-built files. I don’t know if that package has a cleanup script or anything, but if not, maybe try re-downloading the source to a new folder and rebuilding.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.