I am intend to build go code as c library , and link this library in other c code . then integrate in android and ios. But I meet errors in the first step build go code as c library for arm darwin
2017-04-12 0:14 GMT+08:00 hui zhang <fastfad...@gmail.com>: > I want to support go on android and ios. > > package main >> import "fmt" >> import "C" >> //export GoAdder >> func GoAdder(x, y int) int { >> fmt.Printf("Go says: adding %v and %v\n", x, y) >> return x + y >> } >> //export GetMugenVersion >> func GetMugVersion() string { >> str := "Go says: version = 1.0" >> return str >> } >> func main() {} // Required but ignored >> > > this is what I tried on mac os > > GOOS=darwin GOARCH=arm GOARM=7 CGO_ENABLED=1 go build >> -buildmode=c-archive -o libmug_ios.a main.go >> # runtime/cgo >> clang: error: argument unused during compilation: '-mno-thumb' >> GOARM=7 GOARCH=arm go build -buildmode=c-archive -o libmugen_ios.a >> can't load package: package .: no buildable Go source files in >> /Users/xxxxx/Documents/ >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "golang-nuts" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/golang-nuts/LDK6T_3Mc4o/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.