golang:CGO / clang sqlite3.c

golang: CGO / clang with sqlite3.c

我想在 osx 上编译为 arm。 使用以下命令: GOOS=linux GOARCH=arm CGO_ENABLED=1 go build -o foo main.go

但我得到: runtime/cgo clang:错误:编译期间未使用参数:'-mno-thumb'

我使用这个包:https://github.com/mattn/go-sqlite3 我尝试了提示:https://github.com/mattn/go-sqlite3/issues/106

感谢您的帮助:-)

"As the bug report you linked to says, you will need a C compiler that targets ARM Linux. While the Go toolchain comes with everything you need to cross compile pure Go code, it doesn't include the tools needed to cross compile the C components of packages that use cgo." – 詹姆斯·亨斯特里奇

结果,我是在arm设备(raspberrypi)上编译的。