How to compile Go for ARM64 devices? (Jailbroken iPhone 6)

agolangf · · 959 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I&#39;m interested in compiling a Go program for my jailbroken iPhone. I understand that I need to compile for the ARM64 architecture. I&#39;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&#39;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&#39;s scope to communicate through what is really a very limited interface.</p> <p>Im not sure how you&#39;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 &#34;&#34; -target=ios path/to/package/in/your/GOPATH </code></pre></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

959 次点击  
加入收藏 微博
0 回复
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传