gcc: error: unrecognized command line option ‘-mthreads‘; did you mean ‘-pthread‘

一、背景

今天在运行 GitHub - ltaoo/wx_channels_download: 微信视频号下载器 这个github上开源的微信视频号下载器时,执行go run main.go,报错:

package command-line-arguments
        imports github.com/qtgolang/SunnyNet/SunnyNet
        imports github.com/qtgolang/SunnyNet/src/nfapi
        imports github.com/qtgolang/SunnyNet/src/iphlpapi: build constraints exclude all Go files in D:\GoProject\wx_channels_download-main\vendor\github.com\qtgolang\SunnyNet\src\iphlpapi

经过分析,是因为启用了编译约束;最终通过开启 golang的 cgo 和运行编译命令前指明GOOSGOARCH 解决了上面的报错,但同时又报了:

gcc: error: unrecognized command-line option

你可能感兴趣的:(goLang,golang)