An open API service indexing awesome lists of open source software.

https://github.com/andreiavrammsd/cgo-examples

Examples of calling C code from Go
https://github.com/andreiavrammsd/cgo-examples

c cgo go

Last synced: 22 days ago
JSON representation

Examples of calling C code from Go

Awesome Lists containing this project

README

        

# CGO Examples

Examples of calling C code from Go (including a test C library). Passing and getting numbers, strings, enums, structs, callbacks.

### Build and run Docker env
```bash
make env
```

### Compile and run app
```bash
make
```

See [Makefile](Makefile)

### Docs
* https://golang.org/cmd/cgo/
* https://blog.golang.org/c-go-cgo
* https://github.com/golang/go/wiki/cgo
* https://gist.github.com/zchee/b9c99695463d8902cd33
* https://dev.to/mattn/call-go-function-from-c-function-1n3