Skip to content

Commit

Permalink
Merge pull request #299 from shaxbee/master
Browse files Browse the repository at this point in the history
Build and docs for libsqlite3 on OS X
  • Loading branch information
mattn committed Apr 19, 2016
2 parents 22d7351 + e8363dc commit 467f50b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -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"`
Expand Down
3 changes: 2 additions & 1 deletion sqlite3_libsqlite3.go
Expand Up @@ -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"
4 changes: 4 additions & 0 deletions sqlite3_omit_load_extension.go
Expand Up @@ -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")
}

0 comments on commit 467f50b

Please sign in to comment.