Is Golang a good solution to build a cross-platform library?

agolangf · · 566 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hey pals,</p> <p>I have been asking this question to myself for the past few weeks and that is why I am reaching the community right now.</p> <p>I wanted to know if Go is what I should use to build a cross-platform library? I am talking here about mobiles, but not only. I already looked at what is possible with Go and people are mostly talking about GoMobile for Android and iOS, which is a breakthrough, I cannot deny it.</p> <p>My issue is that I will have to bind with some C++ libraries and it might be a strong difficulty using Go for such a case. If some people have experienced being in the same situation, I would be happy to hear about it as well as getting some advice.</p> <p>Thanks in advance,</p> <hr/>**评论:**<br/><br/>GentooMonk: <pre><p>You&#39;re in luck, you can already output shared libraries for OSX/Linux and starting 1.10 you will be able to do it for windows as well.</p></pre>jlouazel: <pre><p>I&#39;ve seen that! Awesome indeed!</p></pre>Cvballa3g0: <pre><p>Heck yes!</p> <p>I was building a Go program to be hosted on my server, due to limitations, I had to run it locally. </p> <p>I compiled my program to run on Android via Process. No change needed in my code either! Works out of the box. (Windows/Mac/Linux/Android tested).</p> <p>Although, I did try gomobile to bind my package as an Android lib (.aar), and had no luck with that. Not all functions were exported, if any. ¯\_(ツ)_/¯</p></pre>jlouazel: <pre><p>By any chance, were you using C++ libraries with your program?</p></pre>Cvballa3g0: <pre><p>No, I wasn&#39;t. Just pure Go. </p></pre>

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

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