gf 不支持cgo
Closed this issue · 8 comments
chenall commented
使用 gf build 如果需要cgo支持就无法编译.
fxk2006 commented
今天用到sqlite3,遇到同样的问题
chenall commented
这个倒不是什么大问题,不使用gf build就可以了,我改成了使用makefile来代替gf build的功能,也很方便。就是需要多写一个makefile文件。
chenall commented
GoFrame CLI Tool v0.7.8, https://goframe.org
Install Path: H:\coding\go\bin\gf.exe
Build Detail:
Go Version: go1.14
GF Version: v1.13.1
Git Commit: 3755de3087f8f00fc95ae0efec558842b3fc565b
Build Time: 2020-08-17 21:08:34
试了一下新版本的,以下两个命令没有什么区别都是一样的错误。
gf build main.go
gf build main.go -c
直接使用原生的命令
go build main.go 正常
测试的代码
https://github.com/minus5/gofreetds/blob/master/example/mssql/main.go
chenall commented
最新版本,使用以下命令成功编译。
gf build main.go -c