-
Notifications
You must be signed in to change notification settings - Fork 16
Library and Include paths vary depending on UNIX OS #14
Copy link
Copy link
Closed
Description
I had to replace these lines in pgdriver.go:
// #cgo CFLAGS: -I/usr/local/pglib/include
// #cgo LDFLAGS: -L/usr/local/pglib/lib -lpq
For me, they were (using Postgres from Mac OS X with Homebrew):
// #cgo CFLAGS: -I/usr/local/Cellar/postgresql/9.3.4/include
// #cgo LDFLAGS: -L/usr/local/Cellar/postgresql/9.3.4/lib -lpq
Run 'pg_config --includedir' and 'pg_config --libdir' to find out what they should be, and then rebuilt pgsqldriver:
cd src/github.com/jbarham/gopgsqldriver
./gen_pg_type.sh
go build pgdriver.go pg_type.go
I'm not sure how to go about making this more cross-OS friendly in general (just learning Go now), but hopefully these instructions help someone else.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels