How to cross-compile with foreign OS dependencies?

agolangf · · 575 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I&#39;m trying to cross compile an application using <a href="https://github.com/mattn/go-gtk">go-gtk</a> for windows on linux, using mingw.</p> <p>My environment is debian linux, and I have installed the gcc-multilib, mingw32, and mingw-w64 packages via aptitude.</p> <p>When I attempt the cross compile, I can specify &#39;i686-w64-mingw32-gcc-win32&#39; as the compiler, but it fails, b/c pango and glib for windows are not installed.</p> <p>If I look inside /usr/i686-w64-mingw32 there are windows-based libraries there, but not pango nor glib.</p> <p>So how can load or install those, so that the compilation succeeds?</p> <p>Looking at <a href="https://github.com/mattn/go-gtk/issues/255">a similar issue in go-gtk</a>, it seems that there&#39;s a dearth of knowledge on how to do this exactly, and not even go-gtk&#39;s author knows.</p> <p>Has anyone here done this successfully?</p> <hr/>**评论:**<br/><br/>lapingvino: <pre><p>I think you should be able to get the source code of those dependencies and cross compile them first, if even necessary to precompile them. The source code for different platforms is usually exactly the same :).</p></pre>dpapathanasiou: <pre><p>I&#39;m not sure I understand: the <a href="http://www.gtk.org/download/windows.php" rel="nofollow">gtk windows page</a> references either binary installers or MS Visual Studio, neither of which I have.</p> <p>How could I compile the windows version under debian, and make it available to the go cross-compiler?</p></pre>

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

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