So there\'s a bunch of stuff on the group that suggests you can do this in go (although not on the cgo documentation):
package bridge
import \"fmt\"
// #cg
A straightforward Makefile to link Go code with a dynamic or static library:
static:
gcc -c gb.c
ar -rcs libgb.a gb.o
go build -ldflags "-linkmode external -extldflags -static" bridge.go
dynamic:
gcc -shared -o libgb.so gb.c
go build bridge.go
Directives in bridge.go:
/*
#cgo CFLAGS: -I.
#cgo LDFLAGS: -L. -lgb
#include "gb.h"
*/
import "C"
...