Category "cgo"

How do I pass a Go callback (function ptr) from Go to Rust via CGo?

I have: A Rust library that is compiled to a static C library A Go program that calls the Rust library's API via CGo I wish to pass a Go function (as callback)

go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: cannot find -lgdal

I am trying to run go build on my sources. go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: cannot find -lgdal collect2: error: ld

Can I change default compiler used by cgo?

I am trying to execute cgo code under ubuntu 14.04, it seems like cgo assume CC/CXX to be gcc/g++. And I need to explicitly specify CC/CXX in order to use, say,

How to return []byte from internal void * in C function by CGO?

I am wrapping an C function with the following definition: int parser_shift(parser* parser, void* buffer, int length); It removes up to length bytes from int