<p>I'm interested in compiling a Go program for my jailbroken iPhone. I understand that I need to compile for the ARM64 architecture. I'm on 64-bit OSX and have tried running the <code>go build</code> command with <code>$GOARCH</code> set to <code>arm64</code>, however the compiler returns the following output:</p>
<p><a href="https://gist.github.com/frequencynine/5e6fd842ee8be0439209" rel="nofollow">https://gist.github.com/frequencynine/5e6fd842ee8be0439209</a></p>
<p>Sugggestions?</p>
<p>Edit: I would like to compile to just an executable, not a whole application.</p>
<hr/>**评论:**<br/><br/>omac777: <pre><p>This might help Go on ios:
<a href="https://github.com/golang/go/wiki/Mobile#building-and-deploying-to-ios" rel="nofollow">https://github.com/golang/go/wiki/Mobile#building-and-deploying-to-ios</a></p></pre>FrequencyNine: <pre><p>please see the edit I made, although thank you for your input</p></pre>BOSS_OF_THE_INTERNET: <pre><p>This doesn't address your question directly, but I did a proof of concept getting a Go codebase running in iOS.</p>
<p>The biggest pain when building the app was narrowing down the app's scope to communicate through what is really a very limited interface.</p>
<p>Im not sure how you're building, but to build a library that works with iOS, you need to use <code>gomobile bind</code></p>
<pre><code>gomobile bind -v -prefix "" -target=ios path/to/package/in/your/GOPATH
</code></pre></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传