ignoring file /usr/local/Cellar/go/1.4/packages/pkg/darwin_amd64/github.com/sarim/gittu.a, file was built for archive which is not the architecture being linked (x86_64)
I manually tried to run cc, but still the same error. Any idea how to generate x86_64 static lib?
This is cool stuff, I was playing with it a few days ago after watching Andrew's presentation.Uploaded to GitHub so it may serve as an example for others: https://github.com/fiorix/gocp
GOOS=darwin GOARCH=arm GOARM=7 go build -buildmode=c-archive -o libmug.a
can't load package: package .: no buildable Go source files in ....
GOOS=darwin GOARCH=arm go build -v -o hello.ios main.go
runtime/internal/sys
runtime/internal/atomic
runtime
math
command-line-arguments
# command-line-arguments
warning: unable to find runtime/cgo.a
/usr/local/Cellar/go/1.8.1/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: warning: ignoring file /var/folders/cp/561_gl9j1wzd8dgv_fn5mk7c0000gn/T/go-link-691505992/go.o, file was built for armv7 which is not the architecture being linked (x86_64): /var/folders/cp/561_gl9j1wzd8dgv_fn5mk7c0000gn/T/go-link-691505992/go.o
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)