diff options
author | mattn <mattn.jp@gmail.com> | 2016-04-19 10:33:13 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2016-04-19 10:33:13 +0900 |
commit | 467f50b0c026317ad28fc2c0a08aab6f755cfc7a (patch) | |
tree | 884b346415382b60eee74c5c1bf96299d21f76f8 | |
parent | Merge pull request #298 from shaxbee/master (diff) | |
parent | Instructions for libsqlite3 on OS X (diff) | |
download | golite-467f50b0c026317ad28fc2c0a08aab6f755cfc7a.tar.gz golite-467f50b0c026317ad28fc2c0a08aab6f755cfc7a.tar.xz |
Merge pull request #299 from shaxbee/master
Build and docs for libsqlite3 on OS X
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | sqlite3_libsqlite3.go | 3 | ||||
-rw-r--r-- | sqlite3_omit_load_extension.go | 4 |
3 files changed, 11 insertions, 1 deletions
@@ -35,6 +35,11 @@ FAQ Use `go build --tags "libsqlite3 linux"` +* Want to build go-sqlite3 with libsqlite3 on OS X. + + Install sqlite3 from homebrew: `brew install sqlite3` + Use `go build --tags "libsqlite3 darwin"` + * Want to build go-sqlite3 with icu extension. Use `go build --tags "icu"` diff --git a/sqlite3_libsqlite3.go b/sqlite3_libsqlite3.go index 0c4c557..135863e 100644 --- a/sqlite3_libsqlite3.go +++ b/sqlite3_libsqlite3.go @@ -8,6 +8,7 @@ package sqlite3 /* #cgo CFLAGS: -DUSE_LIBSQLITE3 -#cgo LDFLAGS: -lsqlite3 +#cgo linux LDFLAGS: -lsqlite3 +#cgo darwin LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3 */ import "C" diff --git a/sqlite3_omit_load_extension.go b/sqlite3_omit_load_extension.go index a80cf87..c7b3bfe 100644 --- a/sqlite3_omit_load_extension.go +++ b/sqlite3_omit_load_extension.go @@ -17,3 +17,7 @@ import ( func (c *SQLiteConn) loadExtensions(extensions []string) error { return errors.New("Extensions have been disabled for static builds") } + +func (c *SQLiteConn) LoadExtension(lib string, entry string) error { + return errors.New("Extensions have been disabled for static builds") +} |