Skip to content

Commit f9aab7d

Browse files
author
George Dunlap
committed
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 <[email protected]>
1 parent d6f416f commit f9aab7d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sqlite3_libsqlite3.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package sqlite3
1111
#cgo CFLAGS: -DUSE_LIBSQLITE3
1212
#cgo linux LDFLAGS: -lsqlite3
1313
#cgo darwin LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3
14+
#cgo darwin CFLAGS: -I/usr/local/opt/sqlite/include
1415
#cgo openbsd LDFLAGS: -lsqlite3
1516
#cgo solaris LDFLAGS: -lsqlite3
1617
*/

0 commit comments

Comments
 (0)