https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64595

--- Comment #4 from Ian Lance Taylor <ian at airs dot com> ---
To invoke cgo, put this code in a file foo.go and type "go run foo.go" (or "go
build foo.go && ./foo").


package main

// #include <stdio.h>
// void cprintln(const char *s) { puts(s); }
import "C"

func main() {
    C.cprintln(C.CString("Hello, world"))
}

Reply via email to