报错如下
E:\code\go\src\github.com\mattn>go get -v github.com/mattn/go-sqlite3
golang.org/x/net/context
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
go-sqlite3\sqlite3_go18.go:18: undefined: SQLiteConn
go-sqlite3\sqlite3_go18.go:26: undefined: SQLiteConn
go-sqlite3\sqlite3_go18.go:27: undefined: namedValue
go-sqlite3\sqlite3_go18.go:29: undefined: namedValue
go-sqlite3\sqlite3_go18.go:35: undefined: SQLiteConn
go-sqlite3\sqlite3_go18.go:36: undefined: namedValue
go-sqlite3\sqlite3_go18.go:44: undefined: SQLiteConn
go-sqlite3\sqlite3_go18.go:49: undefined: SQLiteConn
go-sqlite3\sqlite3_go18.go:54: undefined: SQLiteStmt
go-sqlite3\sqlite3_go18.go:63: undefined: SQLiteStmt
go-sqlite3\sqlite3_go18.go:36: too many errors
配置一下参数
C:\>set CGO_ENABLED=1
C:\>go get -v github.com/mattn/go-sqlite3
github.com/mattn/go-sqlite3
就可以正常编译了
阅读(10858) | 评论(0) | 转发(1) |