As go support below system , what is the difference of android/386 and linux/386
are darwin/arm mean ios ? can go code compile as c library for android and ios ? > go tool dist list > android/386 > android/amd64 > android/arm > android/arm64 > darwin/386 > darwin/amd64 > darwin/arm > darwin/arm64 > dragonfly/amd64 > freebsd/386 > freebsd/amd64 > freebsd/arm > linux/386 > linux/amd64 > linux/arm > linux/arm64 2017-04-12 9:23 GMT+08:00 hui zhang <fastfad...@gmail.com>: > 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/to >> pic/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.