Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile Windows 32-bit on Debian. #143

Open
gxy-13 opened this issue Jul 31, 2024 · 1 comment
Open

Failed to compile Windows 32-bit on Debian. #143

gxy-13 opened this issue Jul 31, 2024 · 1 comment

Comments

@gxy-13
Copy link

gxy-13 commented Jul 31, 2024

env
go version go1.20 linux/amd64

CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -o ../../build/sqlitemanager/amd64/BL-SqliteManager.exe
modernc.org/sqlite/lib
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/defs.go:13:35: undefined: sqlite3_index_constraint
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/defs.go:14:35: undefined: sqlite3_index_orderby
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/defs.go:15:35: undefined: sqlite3_index_constraint_usage
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:19:5: undefined: Xsqlite3_threadsafe
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:29:11: undefined: Xsqlite3_config
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:29:32: undefined: SQLITE_CONFIG_MUTEX
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:29:122: undefined: SQLITE_OK
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:30:8: undefined: Xsqlite3_errstr
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:40:17: undefined: Sqlite3_mutex_methods
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:239:46: undefined: SQLITE_OK
/home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:239:46: too many errors

@liutingpenggithub
Copy link

环境
go 版本 go1.20 linux/amd64

CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -o ../../build/sqlitemanager/amd64/BL-SqliteManager.exe modernc.org/sqlite/lib /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/defs.go:13:35: undefined: sqlite3_index_constraint /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/defs.go:14:35: undefined: sqlite3_index_orderby /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/defs.go:15:35: undefined: sqlite3_index_constraint_usage /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:19:5: 未定义:Xsqlite3_threadsafe /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:29:11: 未定义:Xsqlite3_config /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:29:32: 未定义:SQLITE_CONFIG_MUTEX /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:29:122: 未定义:SQLITE_OK /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:30:8: 未定义:Xsqlite3_errstr /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:40:17: 未定义:Sqlite3_mutex_methods /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:239:46: 未定义:SQLITE_OK /home/guanxy/go/pkg/mod/modernc.org/[email protected]/lib/mutex.go:239:46: 错误太多

使用gorm.io/driver/sqlite库可以打包32位的,兼容该库的功能

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants