This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug go/64595] cgo installed into wrong directory


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]