aboutsummaryrefslogtreecommitdiff
path: root/sqlite3_libsqlite3.go
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@citrix.com>2019-08-19 11:22:53 +0100
committerGeorge Dunlap <george.dunlap@citrix.com>2019-08-19 11:27:31 +0100
commitf9aab7dda8793eeeeada4eaf45374adcf62eada7 (patch)
tree59f00000c7893b5a61979ab13bbe14a35e47399c /sqlite3_libsqlite3.go
parentMerge pull request #732 from mattn/sqlite-amalgamation-3290000 (diff)
downloadgolite-f9aab7dda8793eeeeada4eaf45374adcf62eada7.tar.gz
golite-f9aab7dda8793eeeeada4eaf45374adcf62eada7.tar.xz
darwin/libsqlite3: Also use the homebrew include path
When building on darwin with the `libsqlite3` tag, go-sqlite3 adds the homebrew library path. It does not, however, add the homebrew include path, which means that the MacOS sqlite3 header is used instead. On my system, this results in build errors that look like this: ./sqlite3_load_extension.go:25:8: could not determine kind of name for C.sqlite3_enable_load_extension ./sqlite3_load_extension.go:33:8: could not determine kind of name for C.sqlite3_load_extension Add the homebrew include path as well, so that he header matches the libraries we're using. Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Diffstat (limited to 'sqlite3_libsqlite3.go')
-rw-r--r--sqlite3_libsqlite3.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/sqlite3_libsqlite3.go b/sqlite3_libsqlite3.go
index 26af573..9788f57 100644
--- a/sqlite3_libsqlite3.go
+++ b/sqlite3_libsqlite3.go
@@ -11,6 +11,7 @@ package sqlite3
#cgo CFLAGS: -DUSE_LIBSQLITE3
#cgo linux LDFLAGS: -lsqlite3
#cgo darwin LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3
+#cgo darwin CFLAGS: -I/usr/local/opt/sqlite/include
#cgo openbsd LDFLAGS: -lsqlite3
#cgo solaris LDFLAGS: -lsqlite3
*/