duanjiashai9140
2017-06-29 11:14
浏览 63
已采纳

在其他OS上编译时,程序如何链接系统库?

I understand GO code can be compiled for different platforms (OS).

Lets say I compile on Windows for Linux. If I need a dependency to a Linux system lib - how is this dependency resolved?

图片转代码服务由CSDN问答提供 功能建议

我了解可以为不同平台(OS)编译GO代码。

可以说我是在Windows上为Linux编译的。 如果我需要对Linux系统库的依赖-如何解决该依赖关系?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

  • dongyao2001 2017-06-30 09:54
    最佳回答

    It seems, like to reference system libs of another OS, for example linux system libs when compiling from windows - the linux system libs must be present on the windows system.

    The same would be the case, when using special libs, for example when calling c-libs using "cgo", which maybe could implement some device specific functions. For example on a coffee machine - the functions which starts making coffee or cleaning the machine.

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题