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
You just have to link with -Ldirectory -lgb.
$ cat >toto.c
int x( int y ) { return y+1; }
$ cat >toto.h
int x(int);
$ gcc -O2 -c toto.c
$ ar q libgb.a toto.o
$ cat >test.go
package main
import "fmt"
// #cgo CFLAGS: -I.
// #cgo LDFLAGS: -L. -lgb
// #include
import "C"
func main() {
fmt.Printf("Invoking c library...\n")
fmt.Println("Done ", C.x(10) )
}
$ go build test.go
$ ./test
Invoking c library...
Done 11