请问在windows下连接sqlite应该怎么做?
试了mattn/go-sqlite3..提示
# command-line-arguments
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __moddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __moddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __moddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __moddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __moddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __moddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __umoddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __udivdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __umoddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __udivdi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __umoddi3: not defined
D:\GOPATH\pkg\windows_386/github.com/mattn/go-sqlite3.a(sqlite3_windows.)(.text)
: __divdi3: not defined
too many errors
问题解决: 下载sqlite(Precompiled Binaries for Windows, exe and dll)并加入系统path..
然后修改mattn/go-sqlite3/sqlite3-windows.go里的`#cgo LDFLAGS: -lmingwex -lmingw32` 一行..在后面加入 -lgcc_s
为`#cgo LDFLAGS: -lmingwex -lmingw32 -lgcc_s`
然后再go install.
问题就解决了
#1