cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%

Viewed 178

I'm playing with some Go code and when I try to test something with

go test -race .

I get this:

cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%

but this:

go test .

make all tests pass with flying colours.

My Go version is 1.19, os is windows 10 I also can read this message and it says that I'm missing gcc but why on the other hand this runs fine?

go run -race .
0 Answers
Related