我get gin提示C source files not allowed when not using cgo or SWIG: cpu_gccgo_x86.c
来源:1-1 摒弃千篇一律项目:前后端一体化微服务网关项目

鸡毛哥
2020-12-08
GOROOT=C:\Go #gosetup
GOPATH=D:\GoWs #gosetup
C:\Go\bin\go.exe build -o C:\Users\king.wang\AppData\Local\Temp___demo_start.exe demo/start #gosetup
package demo/start
imports github.com/gin-gonic/gin
imports github.com/gin-contrib/sse
imports net/http
imports crypto/tls
imports golang.org/x/crypto/chacha20poly1305
imports golang.org/x/sys/cpu: C source files not allowed when not using cgo or SWIG: cpu_gccgo_x86.c
一直无法解决,希望帮忙看看
写回答
1回答
-
牛儿吃草
2021-01-02
在环境变量里配置以下变量试试
GO111MODULE=on122021-01-21
相似问题