1
Fork 0
hermetic_cc_toolchain/test/cgo/cgo.go

15 lines
222 B
Go

package main
// #include <stdio.h>
// char* hello() { return "hello, world"; }
// void phello() { printf("%s\n", hello()); }
import "C"
func main() {
C.phello()
}
func Chello() string {
return C.GoString(C.hello())
}