【问题标题】:cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%cgo: C compiler \"gcc\" not found: exec: \"gcc\": 在 %PATH% 中找不到可执行文件
【发布时间】:2022-12-04 11:54:18
【问题描述】:

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 .
  • Try go test -race -vet=off . (see this question for more info).

标签: go testing


【解决方案1】:
【解决方案2】:
猜你喜欢
  • 2021-09-18
  • 1970-01-01
  • 2023-01-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多