views:

308

answers:

1

Hi, How do I use Go's "foreign function interface" to call out to a C function?

This interface is mentioned on the FAQ, but I cannot see it mentioned elsewhere in the docs.

+6  A: 

Check out this file from the Go repository. It shows how to wrap a C library in Go and has quite a few comments that explain the process.

Paul Wicks