go-sqlite3: go build error
i use shell script to go build, but i failed
GOOS=linux GOARCH=386 go build && mv proxyWebApplication proxyWeb/proxyWebApplication && tar zcfv "zip/proxy-linux-386.tar.gz" proxyWeb
why?
this is error information
../github.com/mattn/go-sqlite3/sqlite3_go18.go:26: undefined: SQLiteConn ../github.com/mattn/go-sqlite3/sqlite3_go18.go:27: undefined: namedValue
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (6 by maintainers)
Links to this issue
- reverse/go-sqlite3 at master - reverse - Gitea: Git with a cup of tea
- xorm-cmd/README.md at master - xorm-cmd - Gitea: Git with a cup of tea
- cmd/README.md at master - cmd - Gitea: Git with a cup of tea
- cmd/go-sqlite3 at master - cmd - Gitea: Git with a cup of tea
- cmd/go-sqlite3 at master - cmd - Gitea: Git with a cup of tea
- reverse/go-sqlite3 at master - reverse - Gitea: Git with a cup of tea
- reverse/go-sqlite3 at master - reverse - Gitea: Git with a cup of tea
- xorm-cmd/go-sqlite3 at master - xorm-cmd - Gitea: Git with a cup of tea
- dbweb/go-sqlite3 at master - dbweb - Gitea: Git with a cup of tea
- cmd/README.md at master - cmd - Gitea: Git with a cup of tea
- cmd/go-sqlite3 at master - cmd - Gitea: Git with a cup of tea
- cmd/README.md at master - cmd - Gitea: Git with a cup of tea
- cmd/go-sqlite3 at master - cmd - Gitea: Git with a cup of tea
Commits related to this issue
- Update documentation Compile Section Closes #175 Compile Section Closes #201 Compile Section Closes #206 Compile Section Closes #404 Compile Section Closes #217 Compile Section Closes #224 Compile Se... — committed to gjrtimmer/go-sqlite3 by gjrtimmer 6 years ago
- Update documentation Compile Section Closes #175 Compile Section Closes #201 Compile Section Closes #206 Compile Section Closes #404 Compile Section Closes #217 Compile Section Closes #224 Compile Se... — committed to gjrtimmer/go-sqlite3 by gjrtimmer 6 years ago
For those having this issue on linux (especially if you’re using Ubuntu), please do the following:
The above command will install cross compiler for C. Then you can build with the following code:
To build for windows amd64:
Similarly for windows 386:
Hope this helps.
@GJRTimmer Sorry, I gave up on using SQLite3 in my project because this was too complicated to cross-compile for each OS. I switched to https://github.com/coreos/bbolt in my project which is 100% Go and allows me to compile for each os/arch on my mac.