[Bug go/64595] cgo installed into wrong directory

ian at airs dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 14 15:17:00 GMT 2015


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"))
}



More information about the Gcc-bugs mailing list