Skip to content

Fix windows build with icu tag #1017

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sqlite3_opt_icu.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
package sqlite3

/*
#cgo LDFLAGS: -licuuc -licui18n
#cgo LDFLAGS: -licuuc
#cgo CFLAGS: -DSQLITE_ENABLE_ICU
#cgo linux LDFLAGS: -licui18n
#cgo darwin CFLAGS: -I/usr/local/opt/icu4c/include
#cgo darwin LDFLAGS: -L/usr/local/opt/icu4c/lib
#cgo openbsd LDFLAGS: -lsqlite3
#cgo darwin LDFLAGS: -L/usr/local/opt/icu4c/lib -licui18n
#cgo openbsd LDFLAGS: -lsqlite3 -licui18n
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattn Do you know why we are using -lsqlite3 here? I would think that would cause issues since we'd be simultaneously dynamic linking against the system and statically compiling our own version.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be related on #595

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I cannot test this since I don't have access to an openbsd system. And it's not clear if it was intentional. I will file a separate issue to investigate.

#cgo windows LDFLAGS: -licuin
*/
import "C"